Last active
August 29, 2015 13:57
-
-
Save sblask/9431758 to your computer and use it in GitHub Desktop.
Firegesture script to logically open link or duplicate tab in background next to current tab, meaning it will be selected if current tab is closed or minimized. Requires tab deque extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if the gesture started from a link, open link in new tab | |
var linkURL = FireGestures.getLinkURL(FireGestures.sourceNode); | |
if (linkURL) { | |
gTabDeque.moveTabToSecondPlaceInDeque(gBrowser.loadOneTab(linkURL, {inBackground: true})); | |
return; | |
} | |
// else duplicate tab | |
gTabDeque.moveTabToSecondPlaceInDeque(gBrowser.loadOneTab(gBrowser.currentURI.spec, {inBackground: true})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment