You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
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?
The text was updated successfully, but these errors were encountered: