Search and Find on Favorite Channels
Bookmarking filters of frequently used search targets speeds up daily researching.
Once again looking for results on my prefered channels, I was tired of typing site:foo, site:bar,... So just in early monday morning elan I added a nice little bookmark and named it "magnifier webdesign".
In general bookmarklets work fine like this:
javascript:(function(){ [...here your code...] })();
So to query something like "select text javascript site:stackoverflow.com | site:w3schools.com" I use the following code for my bookmarklet:
(function () {
var filter = '+site:stackoverflow.com+|+site:w3schools.com+';
var t;
try {
t= ((window.getSelection && window.getSelection()) ||
(document.getSelection && document.getSelection()) ||
(document.selection && document.selection.createRange && document.selection.createRange().text));
}
catch(e){ t = "";}
var selectedText = t.toString();
location.href='https://www.google.ch/search?q=' + encodeURIComponent(selectedText) + filter;
}) ()