Hi all,
I need simple JS script to remove google instant preview in search result (annoying popup with site image near each search result). Entire content in these divs:
<div class="vspib"
<div id="bfoot">
Thanks for help
Hi all,
I need simple JS script to remove google instant preview in search result (annoying popup with site image near each search result). Entire content in these divs:
<div class="vspib"
<div id="bfoot">
Thanks for help
lol just go to google.com go to options, search settings ,never show instant results!
GraseMonkey ScriptCode:// ==UserScript== // @name Disable Instant Preview // @namespace http://*.google.*/* // @include http://*.google.*/* // ==/UserScript== //************************************************************************* // Script to make Instant Preview work the way it was designed to. // // According to the documentation, it is supposed to show the preview ONLY // if the preview icon is clicked. In reality, it shows the preview when // any part of the search result is clicked. //************************************************************************* setTimeout(function(){ unsafeWindow.disable_instant_preview = true; var divs = document.getElementsByTagName("div"); for (var key in divs) { var e = divs[key]; if (e.getAttribute('class') == 'vspi' || e.getAttribute('class') == 'vsc') { // register a listener so that if the BUTTON is clicked (and nothing else) we get the preview e.addEventListener('click', function(evt) { // Toggle preview if the preview button itself is pressed if (evt.target.getAttribute('class') == 'vspib') { unsafeWindow.disable_instant_preview = !unsafeWindow.disable_instant_preview; } if (unsafeWindow.disable_instant_preview && evt.target.tagName != 'A' && evt.target.tagName != 'BUTTON') { evt.stopPropagation(); // don't let google have it } }, true); }; } // And finally, allow ourselves to re-disable it by clicking on the x document.getElementById("vspci").addEventListener('click', function() { unsafeWindow.disable_instant_preview = true; }, true); // because the preview is a lot like a bubble, when the relevant area // loses focus, we should kill it. document.getElementById("res").addEventListener('blur', function() { unsafeWindow.disable_instant_preview = true; }, true); }, 10);
Altought Google is f....... business, i hate this instant preview so much aswell ;0
http://www.countinfinity.com/blog/20...stant-preview/
I have found this sometime ago, hope this can help you somehow.
Main idea was from this guy http://userscripts.org/scripts/review/90222
Last edited by rodoxfnx; 2012-02-16 at 10:46 AM.
Thanks, I've finally updated my old opera, which was modified and tuned, and lost some features. So I also get a problem with instant preview... truly annoying.
---------- Post added at 03:54 PM ---------- Previous post was at 02:47 PM ----------
Full script for Opera (based on danei's script). Will remove tracking and instant preview:
Code:// ==UserScript== // @name Remove Google Redirect // @include http://www.google.*/* // @include https://www.google.*/* // @include http://ipv6.google.*/* // @include https://ipv6.google.*/* // @include http://encrypted.google.com/* // @include https://encrypted.google.com/* // @include http://news.google.*/* // @include https://news.google.*/* // @run-at document-start // based on http://userscripts.org/scripts/review/117942 // ==/UserScript== document.addEventListener('DOMNodeInserted',checksearch,false); function checksearch() { var list=document.getElementById('ires'); if(list) { document.removeEventListener('DOMNodeInserted',checksearch,false); document.addEventListener('DOMNodeInserted',clear,false); } if(window.location.hostname.match(/news\.google\..+/)) { document.removeEventListener('DOMNodeInserted',checksearch,false); document.addEventListener('DOMNodeInserted',clearnews,false); } } function repaire_link(node) { node.removeAttribute('onmousedown'); var orihref=node.getAttribute('originalhref'); if(orihref) { if(node.href!=orihref) node.href=orihref; return; } var regex= [ /^(.+url\?q=)(.+)(&sa=.+)$/, /^(.+&url=)(.+)(&ei=.+)$/, /^(.+url\?url=)(.+)(&rct=.+)$/, /^(.+&url=)(.+)$/ ]; for(var i=0;i<regex.length;++i) { var realhref=node.href.replace(regex[i],function(str,p1,p2,p3){return p1&&p3?p2:null}); if(realhref&&realhref!=node.href) { node.href=unescape(realhref); return; } } } function clear() { var list=document.getElementById('ires'); if(list) { items=list.getElementsByTagName('a'); for(var i=0;i<items.length;++i) { repaire_link(items[i]); } } var el = document.getElementById('bfoot'); el.parentNode.removeChild(el); } function clearnews() { function _clear(event) { var node=event.target; if(!node||event.attrName!='href')return; repaire_link(node); } var items=document.getElementsByTagName('a'); for(var i=0;i<items.length;++i) { items[i].addEventListener('DOMAttrModified',_clear,false); //repaire_link(items[i]); } }
Please, post your questions on forum, not by PM or mail
I spend my time, so please pay a little bit of your time to keep world in equilibrium
Thanks Sweeeeeeeeet.