Created
December 25, 2008 21:32
-
-
Save winkerVSbecks/39956 to your computer and use it in GitHub Desktop.
search on mininova
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
CmdUtils.CreateCommand({ | |
name: "mini", | |
takes: {"search_string": noun_arb_text}, | |
license: "Public domain", | |
preview: "Searches for torrent on mininova.", | |
execute: function( directObj ) { | |
var search_string = encodeURIComponent(directObj.text); | |
//Utils.openUrlInBrowser( "http://www.mininova.org/search/?search=" + search_string); | |
//The above doesn't work ( http://labs.toolness.com/trac/ticket/230 ). | |
//In irc://irc.mozilla.org/ubiquity dims suggested this hack: | |
var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"] | |
.getService(Components.interfaces.nsIWindowMediator); | |
var browserWindow = windowManager.getMostRecentWindow("navigator:browser"); | |
var browser = browserWindow.getBrowser(); | |
browser.loadOneTab("http://www.mininova.org/search/?search=" + search_string, null, null, null, false, false); | |
} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment