Google search addon v3

By mouseboyx Last update Jun 1, 2008 — Installed 2,779 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 21 posts, 9 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
mouseboyx Script's Author

No more work on this script will take place by the original owner, because of http://www.goosh.org/.

 
mouseboyx Script's Author

The GUI version takes way to long to make, but i refined it, and rewrote it so that it might be easier to understand.

 
Uldor User

Also, could be get Ebay added?

Plus, id like to have an option where you could disable or enable a search without modifying code. This is because a lot of people dont use wikipedia and ebay, and it would just clutter the dropdown menu. Then you can put a heap of searches on here, so anyone can modify the searches in the dropdown menu to their liking.

The next step from there would be to make it possible to simply add a webpage to the dropdown list, by simply clicking a button and 'adding it'. However, i think you will need to create a firefox extension to do this.

 
Uldor User

Firstly, i know nothing about scripts. I used this script and found it doesn't work on google.co.uk and google.com.au. SO i took 'MainP' advice and changed last line from

'forms[0].parentNode.insertBefore(logo, forms[4]);
to
'forms[0].parentNode.insertBefore(logo, forms[7]);
.

Worked a charm. But i still had to go to the script and change a few google images links from 'google.com/blahblahblah' to 'google.com.au/blahblahblah'. This was because it kept reverting to Google Images (America) every time i searched an image.

This is an awesome script. Someone please fix it so every language in Google AND Google images is supported without user having to do anything.

 
mouseboyx Script's Author

Im always making usless scripts...

 
amareus Scriptwright

Sorry, the code wont come out right, Sorry for cluttering the site. Visit my page for the script.

 
amareus Scriptwright

Sorry, use this script:

// ==UserScript==



// @name           Google search addon



// @namespace      google



// @include        http://www.google.com/



// @include        http://www.google.com/webhp?*

// @include        http://www.google.*/

// @include        http://www.google.*/webhp?*



// ==/UserScript==

























var logo = document.createElement("span");  //create element











logo.innerHTML = '<select>' //starting select

// new searches go below here

//begin default option back to google



+'<option>Google'





//end default back to google



//googleimages start

+'<option>Images'
//googleimages end









									// begin new search

// youtube start

+'<option>Youtube' // name of option



//youtube end

									// end new search







									//example begin without comments

//wikipedia start

+'<option>Wikipedia'

//wikipedia end

									//example end without comments







// new searches go above here

+'</select>' //ending select needed for the searches







var forms = document.getElementsByTagName('input');

forms[0].parentNode.insertBefore(logo, forms[7]);  //insert the table for searches

 
amareus Scriptwright

Hey guys,
If you are using "Google Harry" (http://userscripts.org/scripts/show/10778)
then I recommend you changing the script to this:

// ==UserScript==

// @name Google search addon

// @namespace google

// @include http://www.google.com/

// @include http://www.google.com/webhp?*

// @include http://www.google.*/

// @include http://www.google.*/webhp?*

// ==/UserScript==

var logo = document.createElement("span"); //create element

logo.innerHTML = '

+'cng(fname,fact,inname,logosrc,searchval,widthl,heightl) {' //main function to create searches begin

+'var x=document.getElementsByName(fname);' //name of the form to change

+'var searchlogo=document.getElementsByTagName("img");' //get all image tags

+'searchlogo[0].width = widthl;'

+'searchlogo[0].height = heightl;'

+'x[0].action = fact;' //change form action

+'x[0].q.name = inname;' //change main input name

+'searchlogo[0].src = logosrc;' //change logo

+'x[0].btnG.value = searchval;' //change input search value

+'document.f.q.focus();' //autofocus form after selection

+'}

+'<select>' //starting select

// new searches go below here

//begin default option back to google

+'<option>Google'

//end default back to google

//googleimages start

+'<option>Images'
//googleimages end

// begin new search

// youtube start

+'<option>Youtube' // name of option

//youtube end

// end new search

//example begin without comments

//wikipedia start

+'<option>Wikipedia'

//wikipedia end

//example end without comments

// new searches go above here

+'</select>' //ending select needed for the searches

var forms = document.getElementsByTagName('input');

forms[0].parentNode.insertBefore(logo, forms[7]); //insert the table for searches

 
ricardofcf Scriptwright

if you have Stumble Upon links in Google search for 'searchlogo[0]' and replace it with 'searchlogo[2]'.

 
MainP User

If you change the last line in:
forms[0].parentNode.insertBefore(logo, forms[7]);
Then it works in German Google to ;-)

 
mouseboyx Script's Author

Where is the site you want the search from?

 
TastyFlySoup Scriptwright

rapidshare search (maybe?) i dunno :P

 
mouseboyx Script's Author

its ok just change the metadata

 
bl_nk Scriptwright

My bad, the name is the same

 
bl_nk Scriptwright

Do not rename the script when you update, the users must then uninstall your old version manually.

 
TastyFlySoup Scriptwright

well google.co.uk should also be in the include list for starters ;)

 
mouseboyx Script's Author

Any suggestions?
boolean for Im feeling lucky?

 
TastyFlySoup Scriptwright

nicely done

 
mouseboyx Script's Author

Done!

 
Michael Fern... User

I like your script, very useful. One suggestion: could you set the google radio button to <select> since it's the default.</select>

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel