Surrogates, GM Scripts, performance vs usefulness
Posted: Mon Oct 31, 2011 7:33 pm
I have to admit, I am not a big fan of Google's ideas about what we want and should want and often find them annoying and bloated. However, is this extreme reversing really necessary? It would seem that the overhead to the browser outweighs any benefit of aesthetics. Have you done a benchmark to see how badly this would affect performance? Just wondering. Specially that disabling the google instant would not be retained if you have automatic history/cache dumping, no? Now in chrome you can disable it by default using the GUI but in Fx I think you can only achieve permanent disable of that using the config, right?al_9x wrote:Updated Google Instant surrogate
Code: Select all
user_pref("noscript.surrogate.google_preview.sources", "@^https?://www\.google\.com/search\?(?!(?:.*&)?tbm=[^&]+)"); user_pref("noscript.surrogate.google_preview.replacement", "addEventListener('DOMContentLoaded', function(e) {Array.forEach(document.getElementsByClassName('vsc'), function(e) {if (e.tagName === 'DIV' && e.hasAttribute('sig')) e.removeAttribute('sig');}); Array.slice(document.getElementsByClassName('vshid')).forEach(function(e) {if (e.tagName === 'SPAN' && !(e.previousElementSibling && e.previousElementSibling.tagName === 'SPAN' && e.previousElementSibling.classList.contains('gl')) && e.firstElementChild) {e.classList.remove('vshid'); e.classList.add('gl'); e.insertBefore(document.createTextNode(' - '), e.firstElementChild);}});}, true); addEventListener('load', function(e) {var count = typeof e === 'number' ? e : 1; var els = Array.slice(document.getElementsByClassName('vspib')); if (els.length) els.forEach(function(e) e.parentNode.removeChild(e)); else if (++count <= 2) setTimeout(arguments.callee, 100, count);}, false);");