Handy Google site search script

Sam

Chief Administrator & Benevolent Dictator
Staff member
Joined
Nov 6, 2006
Messages
10,491
Location
Covington, Louisiana
I posted this awhile back, but it's so useful I thought I'd do a repost. I use this all the time and it's one of the handiest things ever for searching a site you're on.
------------

This is one of the handiest search tools I have. What it does is make a popup search box that allows you to restrict your search to whatever site you're on at the moment.
I used it this morning to find the old WHAT DID YOU LOOK LIKE BACK THEN thread. Google's search is far better than the forum's search tool for many things.

Here's what you do: Create a new favorite or bookmark in your browser and enter this code where you'd normally have a website address. Then test it on a few sites and see how you like it. It's fantastic and is very fast and accurate.

HTML:
javascript:Qr=prompt('Search%20Site%20for','');if(Qr)location.href='http://www.google.com/search?&q=site:'+encodeURIComponent(window.location.hostname)+'+'+escape(Qr)
 

Sam

Chief Administrator & Benevolent Dictator
Staff member
Joined
Nov 6, 2006
Messages
10,491
Location
Covington, Louisiana
Bumping this thread to the top. I cannot live without this script as a site searching feature. I keep it in my bookmarks on computers, phones, iPads, etc., so I can site search any site I'm on. If you're not using this, you are seriously missing out on the greatest internet search tool.
 

alladin

Member
Joined
Dec 26, 2014
Messages
28
Call me thick, I can't figure it out. How can you call it up if it is in your bookmarks and you are on a different site?
Thank you for your patience in advance.
 

Chujybear

~ Elite 1000 Member ~
Joined
Nov 3, 2011
Messages
1,079
Location
Haida Gwaii
add it to your bookmarks bar. then is just a matter of clicking it
as for how to bookmark:
select and copy the text for the script,
then in the bookmarks menu select "bookmark this page"
then in the next pop up you will get a page with an option to "edit"
hit edit, it will brng you to another page with two text bars.. title the link whatever you like, and then paste the search script into the url field.

thats it except that if i were you i would be doubly sure that you save it in the bookmarks bar, then you don't have to deal thith any drop dow windows, your button to search ill be right at the top of thour page
 

Sam

Chief Administrator & Benevolent Dictator
Staff member
Joined
Nov 6, 2006
Messages
10,491
Location
Covington, Louisiana
add it to your bookmarks bar. then is just a matter of clicking it
as for how to bookmark:
select and copy the text for the script,
then in the bookmarks menu select "bookmark this page"
then in the next pop up you will get a page with an option to "edit"
hit edit, it will brng you to another page with two text bars.. title the link whatever you like, and then paste the search script into the url field.

thats it except that if i were you i would be doubly sure that you save it in the bookmarks bar, then you don't have to deal thith any drop dow windows, your button to search ill be right at the top of thour page

thanks Chujybear
 

alladin

Member
Joined
Dec 26, 2014
Messages
28
I guess I will leave it for the tech savvy, still can't figure it out.
I know the " site search " under the cafe logo works much better then the white search box to it's right.
Is this how it should work on other sites.
Thanks again.
 

vilts

Elite Cafe Member
Joined
Apr 8, 2007
Messages
512
Location
Estonia
Another way, which I use all the time, is to add the "site: xxx" clause to the google search. So, for example searching for "gold overlay" in only on this site looks like this


gold overlay site:engraverscafe.com

And yet another trick is to use google's converter to, well, convert between units, currencies etc. So these work

  • 1000 usd to eur
  • 1/4 inch to mm
  • furlongs per fortnight to centimeters per second
  • 2 decades to fortnight

And while we're at converting and calculating stuff. Wolframalpha is super useful for that. Some examples

  • 10g gold volume in cm3
  • 20cm3 * (titanium density)

So, how much does a gold sheet of 0.5x80x60 mm weigh? Easy:

  • (0.5 * 80 * 60)mm3 * (gold density)

Or if you want to compare material properties, like densities etc, just put them to the searchbox:

  • stannum aurum argentum
 

Tim Wells

~ Elite 1000 Member ~
Joined
Nov 9, 2006
Messages
1,331
Location
Dallas, Georgia
I don't get it either. On my Mac when I make a new bookmark it doesn't give all those options and other pages.

So I went to a site I have bookmarked, Practical Machinist and pasted that script into the URL window and Safari told me it doesn't allow java script from the "smart search field". Not so smart after all and apparently neither am I.
 
Last edited:

Latest posts

Sponsors

Top