How Do You Block Anti Adblock Script?

Boo Berry

Moderator + Beta Tester
Moderator
Heh, an Anti Block script that's a bit of a PITA. This rule *should* work, but it doesn't work for me (yet), odd.

Code:
@@||pagead2.googlesyndication.com/pagead/show_ads.js$domain=better-explorer.com
Avatar, perhaps this filter addon subscription for Easylist may be useful for Adguard too?
 
Last edited by a moderator:

Nameless

Beta Tester
Seen a few fixes for this and so far all have failed, the one that looked right which is in the easy list is below but it failed.

Code:
@@.png#$domain=android-zone.org|anonytext.tk|backin.net|better-explorer.com|chrissmoove.com|lordpyrak.net|myiplayer.eu
@@||better-explorer.com^$elemhide
I think the best solution is a userscript this one works: http://userscripts.org:8080/scripts/review/155840
 

Boo Berry

Moderator + Beta Tester
Moderator
Ah, the author also has a filter subscription available to use with this userscript. We should start a recommended extension (userscript) thread. You should install the userscript from this direct link (copy and paste). Avatar, any chance at having an anti-adblock filter?
 
Last edited by a moderator:

avatar

Administrator
Staff member
Administrator
Why? We have javascript injection rules that could work as good as this userscript.
Storing these anti-adblock rules in our filters is much simpler than installing some third-party userscript.

So, let's do it in English filter.

First, we'll create a simple API to use:
Code:
#%#AG_onLoad = function(func) { window.addEventListener('DOMContentLoaded', func); };
#%#AG_removeElementById = function(id) { var element = document.getElementById(id); if (element && element.parentNode) { element.parentNode.removeChild(element); }};
And now blocking anti-adblock:)
Code:
better-explorer.com#%#AG_onLoad(function() { AG_removeElementById('y34e') });
I think we could think of some heuristic to block antiblock.org scripts but we'll do it simple way this time.
Btw, maybe you have thoughts on this heuristic?
 

Boo Berry

Moderator + Beta Tester
Moderator
Using heuristics might be beneficial but there's always that potential Antiblock could update to break successful blocking. One other thought that came to mind yesterday was a custom extension (userscript) maintained by you guys like the Assistant and popup blocker that's updated for anti-Adblock scripts. However seeing how the filters can do this, that's probably better, right?
 
Top