Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // title : Clear Highlight for Google Cache
- // description :
- // uuid : 2b5baf09-434f-4036-9e4f-022476094531
- //bookmarklet
- /*
- javascript:(function(){if(window.location.hostname.indexOf("webcache.googleusercontent.com")===0){var a=window.location,b=encodeURI(decodeURI(a.href)),c=encodeURI(decodeURI(a.search)).split("&"),d=c[0].indexOf("+");if(d!==-1){var e=c[0].slice(0,d);b=b.replace(c[0],e);a.assign(b)}};})();
- */
- //main
- (function(){
- if(window.location.hostname.indexOf('webcache.googleusercontent.com') !== 0) return;
- var l = window.location;
- var strUrl = encodeURI(decodeURI(l.href));
- var lstQuery = encodeURI(decodeURI(l.search)).split('&');
- var intIndexAND = lstQuery[0].indexOf('+');
- if(intIndexAND === -1) return;
- var strMinSearch = lstQuery[0].slice(0, intIndexAND);
- strUrl = strUrl.replace(lstQuery[0], strMinSearch);
- //console.log(strUrl);
- l.assign(strUrl);
- })();
Add Comment
Please, Sign In to add comment