Created
February 6, 2009 06:27
-
-
Save lkraider/59254 to your computer and use it in GitHub Desktop.
Ubiquity I'm Feeling Lucky google search
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
/* Based on Royall's original quicky script: | |
* http://gist.github.com/16507 | |
*/ | |
CmdUtils.CreateCommand({ | |
name: "quicky", | |
icon: "http://www.google.com/favicon.ico", | |
homepage: "http://lkraider.eipper.com.br/ubiquity", | |
author: { name: "Paul Eipper", email: "[email protected]"}, | |
license: "GPL", | |
description: "Perform an I'm Feeling Lucky google search on the preview pane", | |
help: "just type the search terms", | |
takes: {"input": noun_arb_text}, | |
preview: function( pblock, input ) { | |
var searchTerm = input.text; | |
if (input.text.length == 0) { | |
pblock.innerHTML = "<b>Please enter a search term</b>"; | |
return; | |
} | |
var h = "http://www.google.com/search?ie=utf-8&btnI=&q=" + searchTerm; | |
//CmdUtils.renderTemplate(template, h); | |
var msg = "<iframe src='" + h + "' style='width:100%;height:100%;min-width:400px;min-height:400px;' />"; | |
pblock.innerHTML = msg; | |
}, | |
execute: function(input) { | |
Utils.openUrlInBrowser("http://www.google.com/search?ie=utf-8&btnI=&q=" + searchTerm); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment