Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
Google search addon v3
Adds a drop down menu to google so that you can change what you are searching, and comes with comments to add searches, default is :Wikipedia. Fixed for all domains, not just .com
Beta test of Version 3 Someone can make an easy gui to add different searches, but that is the most time consuming part of the script, It is more effcient than the previous version and has been completely rewritten to utilize GM_set/getValue.
|
|
No more work on this script will take place by the original owner, because of http://www.goosh.org/. |
|
|
The GUI version takes way to long to make, but i refined it, and rewrote it so that it might be easier to understand. |
|
|
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. |
|
|
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. |
|
|
Im always making usless scripts... |
|
|
Sorry, the code wont come out right, Sorry for cluttering the site. Visit my page for the script. |
|
|
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
|
|
|
Hey guys,
// @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'
// 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
|
|
|
if you have Stumble Upon links in Google search for 'searchlogo[0]' and replace it with 'searchlogo[2]'. |
|
|
If you change the last line in:
|
|
|
Where is the site you want the search from? |
|
|
rapidshare search (maybe?) i dunno :P |
|
|
its ok just change the metadata |
|
|
My bad, the name is the same |
|
|
Do not rename the script when you update, the users must then uninstall your old version manually. |
|
|
well google.co.uk should also be in the include list for starters ;) |
|
|
Any suggestions?
|
|
|
nicely done |
|
|
Done! |
|
|
I like your script, very useful. One suggestion: could you set the google radio button to <select> since it's the default.</select> |
You could comment on this script if you were logged in.
