// ==UserScript== // @name Google Redirector // @namespace http://d.hatena.ne.jp/youpy/ // @include * // ==/UserScript== (function() { var targets = document.evaluate('//a[starts-with(@href, "http")]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0; i < targets.snapshotLength; i ++) { targets.snapshotItem(i).href = 'http://www.google.com/url?sa=D&q=' + encodeURIComponent(targets.snapshotItem(i).href); } })();
You need to create an account or log in to post comments to this site.