Nissan 370Z Forum

Nissan 370Z Forum (http://www.the370z.com/)
-   The Lounge (Off Topic) (http://www.the370z.com/lounge-off-topic/)
-   -   Bookmarklet to Search The370Z Using Google (http://www.the370z.com/lounge-off-topic/98208-bookmarklet-search-the370z-using-google.html)

SouthArk370Z 11-14-2014 04:13 PM

Bookmarklet to Search The370Z Using Google
 
Use this bookmarklet to search The370Z.com using Google
1) Drag the following link to your browsers bookmark toolbar (you may have to enable the bookmark bar first) to create a button*:
Search The370Z Using Google **

2) Select some text on a web page.

3) Click the button you created in step 1.

This should take you to a Google search page with the text you selected and the search limited to the370z.com.


Tested in Firefox 33.1 under Win7.



Edit 2014-12-02
* Or drag it to your Bookmarks menu and use it from there.
Edit 2016-02-14
** The forum seems to be trying to turn the bookmarklet into a web link. If you have problems, here's the code to make your own bookmarklet:
Code:

javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('Keywords...',''))};if(Qr)location.href='http://google.com/search?query=site:the370z.com%20'+escape(Qr)+'&num=10
Short Explanation
Most search engines allow you to limit your search to a single site by adding "site:DomainName" to your search string. Eg, to search for "dogs" on the arf.edu web site use "site:arf.edu dogs" (or "dogs site:arf.edu"). The bookmarklet is a JavaScript script that grabs whatever text you have selected, adds "site:the370z.com" to it, and then requests the Google page for that search string. It can be modified to work with most of the major search engines.

SwissCheese 11-14-2014 10:58 PM

I tried it in Chrome and it didn't work.

SouthArk370Z 11-14-2014 11:53 PM

Quote:

Originally Posted by SwissCheese (Post 3031639)
I tried it in Chrome and it didn't work.

Thanks for the bug report.

Only thing I can think of is you may need to enable JavaScript. If that's not it, let me know and I'll see what I can find out.

Edit: Did a Q&D search and found this workaround
When you get to the last step, use:
Code:

javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('Keywords...',''))};if(Qr)location.href='http://google.com/search?query=site:the370z.com%20'+escape(Qr)+'&num=10'
instead of the code they provide.

Let me know what happens, please. TIA.

SwissCheese 11-16-2014 07:25 PM

That did the trick!

Good idea, too. That method (limiting the site to the370z.com in the search bar) is usually how I search for things on this site anyways .


All times are GMT -5. The time now is 10:43 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 PL2