Login being blocked by adblocker

521 Views Asked by At

I am wondering, because I got a website login script and it uses this command:

if(document.getElementById('linkreg'))
    document.getElementById('linkreg').onclick = function () 
    {
        ajaxSend(php_fileusr, 'susr='+texts['register'], adboxshow);
        objLogare.adLogInr();
        return false;
    };

Anyways, this function is triggered when the register for a new account (same thing for recovering account but different script). Anyways, some users weren't able to register because the window never popped up. I figured out that this is caused by the adblock extension. I am wondering if there is any way to replace the command adboxshow. Does anyone know any alternatives that work the same but won't be blocked?

1

There are 1 best solutions below

0
On

Thanks to comments from Poke and Cezary, I figured it out

If I was an adblocker, and would see a function called adboxshow, I would certainly block that as well. Can’t you rename it to something more sensible? It does indeed sound as if you want to show an advertising box here… – poke yesterday

Adblock is designed to block containers/scripts/css classes, that has "ad*" prefix. You should avoid that, even if it's short for "awsome dynamic" ;) – Cezary Daniel Nowak yesterday

I changed every function, class, or div that had the word "ad" in it, specifically starting with the word "ad" in order to make it compliant with ad blocker.

-I hope this helps others who are trying to make a website that has legitimate content that is not blocked by adblockers.