Skip to content

Instantly share code, notes, and snippets.

@ssokolow
Created November 3, 2011 13:21
Show Gist options
  • Select an option

  • Save ssokolow/1336458 to your computer and use it in GitHub Desktop.

Select an option

Save ssokolow/1336458 to your computer and use it in GitHub Desktop.
al_9x's updated Google Instant killer, adjusted to apply to encrypted.google.com too
user_pref("noscript.surrogate.google_preview.sources", "@^https?://(www|encrypted)\.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);");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment