Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Duplicate tab in background #113

Closed
OmTatSat opened this issue Aug 21, 2020 · 2 comments
Closed

Duplicate tab in background #113

OmTatSat opened this issue Aug 21, 2020 · 2 comments
Labels

Comments

@OmTatSat
Copy link

Hello, please add the ability to duplicate tab in the background

I found an extension with this ability, but I need to do this with gesture.

That extension use the code:

chrome.commands.onCommand.addListener(function(command) {
if (command == "duplicate-tab") {
chrome.storage.sync.get(default_options, function(options) {
if (options.background) {
// Open tab in background
chrome.tabs.query({
currentWindow: true,
active: true,
}, function(tabs) {
var tab = tabs[0];
chrome.tabs.create({
active: false,
index: tab.index+1,
openerTabId: tab.id,
url: tab.url,
});
});
}
else {
// Open tab in foreground
chrome.tabs.query({
currentWindow: true,
active: true,
}, function(tabs) {
var tab = tabs[0];
chrome.tabs.duplicate(tab.id);
});
}
});
}

May be you can adapt and use it for smartup?

@zimocode
Copy link
Owner

It will fixed in next version with an new option:
image

@OmTatSat
Copy link
Author

Great! Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants