leed-adblock/adblock/js/adblock_plugin_js.js
Phyks 9b5d91f927 First working version
This version should work to block both images and flash contents. It
supports elegant degradation etc.

Please report any issue as I didn't test it with every feed available...
2013-08-05 23:17:21 +02:00

25 lines
631 B
JavaScript

function adblock_whitelist_blacklist(id, whitelist_blacklist) {
if(whitelist_blacklist == 0)
document.getElementById(id).innerHTML = "Whitelist :";
else
document.getElementById(id).innerHTML = "Blacklist :";
}
function adblock_unblock_img(span, url) {
if($(span).html() != "X")
return true;
$(span).html("<img src='"+url+"'/>");
$(span).removeClass("blocked_image");
return false;
}
function adblock_unblock_flash(span, new_content) {
if($(span).html() != "X")
return true;
$(span).html(new_content);
$(span).removeClass("blocked_flash");
return false;
}