How to make your own time-saving search bookmarklets

TechRadar
Custom bookmarklets offer a quick and easy way to search your favourite sites

If you want to extend your browser's search capabilities then you could install a toolbar or add-on. But that'll use system resources, require regular updates, and could make your system less reliable.

A better idea is to use a bookmarklet, a piece of custom JavaScript that lives in your browser favourites and won't slow you down at all. You're clueless about JavaScript? That doesn't matter. Greg R Notess has already created some excellent search bookmarklets, so you can just borrow this Google example and tweak it to suit your needs:

Perhaps you'd like an easy way to search the Sky Sports site, for instance. Visit www.skysports.com, enter Ronaldo in the search box and click Search. Then look at the contents of your browser address box: http://www.skysports.com/autonomy/results/1,20720,,00.html?searchtype=the+site&q=ronaldo .

Strip off our Ronaldo query and the Sky Sports search URL is "http://www.skysports.com/autonomy/results/1,20720,,00.html?searchtype=the+site&q=". Replace the Google URL in the original bookmarklet with that one and we have this:

javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (!q) q = prompt("Search words", ""); if (q!=null) location="http://www.skysports.com/autonomy/results/1,20720,,00.html?searchtype=the+site&q=" + escape(q).replace(/ /g, "+"); void 0

Mike Williams
Lead security reviewer

Mike is a lead security reviewer at Future, where he stress-tests VPNs, antivirus and more to find out which services are sure to keep you safe, and which are best avoided. Mike began his career as a lead software developer in the engineering world, where his creations were used by big-name companies from Rolls Royce to British Nuclear Fuels and British Aerospace. The early PC viruses caught Mike's attention, and he developed an interest in analyzing malware, and learning the low-level technical details of how Windows and network security work under the hood.