Hide Intrusive Ads with a Bookmarklet
I was reading a page with content literally buried beneath flashy ads, and I really couldn’t concentrate.
This is my solution, very very simple.
- Once: Drag and drop these bookmarklets into your bookmarks
- jQuerify:
(function () { if (typeof jQuery == 'undefined') { var s = document.createElement('script'); s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js'); document.getElementsByTagName('head')[0].appendChild(s); } var time = 0, id = setInterval(function () { if (typeof jQuery != 'undefined') { clearInterval(id); alert('jQuery ' + jQuery.fn.jquery + ' is available.'); jQuery.noConflict(); } else if (++time == 10) { clearInterval(id); alert('ERROR: jQuery is not available.'); } }, 500); })(); - iToggle:
(function ($) { if (!$('body').data('hidden_ads')) { $('iframe:visible').data('hidden_ad', true).hide(); $('body').data('hidden_ads', true); } else { $('iframe:hidden').filter(function () { return $(this).data('hidden_ad') }).removeData('hidden_ad').show(); $('body').removeData('hidden_ads'); } })(jQuery);
- jQuerify:
- Any time: Execute jQuerify and then iToggle
It’s also quite safe, because you can get iframes back.
Anyway, consider the Kick Ass bookmarklet if you’re really upset.