Created
July 13, 2014 18:21
-
-
Save XrXr/9caab1355b2e29d6bd08 to your computer and use it in GitHub Desktop.
FireGesture scripts
This file contains 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
var sel = FireGestures.getSelectedText(); | |
if (sel) { | |
gBrowser.loadOneTab('http://www.thefreedictionary.com/'+sel, null, null, null, false, false); | |
return; | |
} |
This file contains 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
var sel = FireGestures.getSelectedText(); | |
var linkURL = FireGestures.getLinkURL(srcNode); | |
if (sel && linkURL) { | |
BrowserSearch.loadSearch(sel, true); | |
return; | |
} | |
// (1) If you started gesture from a link, do 'Open Link in New Tab' | |
var srcNode = FireGestures.sourceNode; | |
//var linkURL = FireGestures.getLinkURL(srcNode); | |
if (linkURL) { | |
gBrowser.loadOneTab(linkURL, null, null, null, false, false); | |
return; | |
} | |
// (2) Else if you select text, do 'Search for Selection' | |
//var sel = FireGestures.getSelectedText(); | |
if (sel) { | |
BrowserSearch.loadSearch(sel, true); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment