Created
May 12, 2010 16:11
-
-
Save 10sr/398767 to your computer and use it in GitHub Desktop.
keysnailで文字入力→検索エンジン選択みたいな
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
| plugins.options["search-url-list"] = [ | |
| ["bing","http://bing.com/search?q=%q"], | |
| ["raw","%r"], | |
| ]; | |
| ext.add("query-then-engine", function () { | |
| prompt.read("Search Word?:", function (q) { | |
| if (q) { | |
| prompt.selector({ message : "search \"" + q + "\" with?", | |
| collection : plugins.options["search-url-list"], | |
| width : [20,80], | |
| callback : function (i) { if (window.loadURI) {getBrowser().selectedTab = getBrowser().addTab(plugins.options["search-url-list"][i][1].replace("%r",q).replace("%q",encodeURIComponent(q)));} }, | |
| }); | |
| }; | |
| }); | |
| }, "enter search word and then select engine"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment