Richard Abercrombie
Richard Abercrombie

Reputation: 313

Adblock blocking a javascript page

I have a page as follows:

$(document).ready(function() {
    $('.loader').hide();      

    function do_nothing() { 
      return false;
    }

    // prevent a second click for 10 seconds. :)
    $('a, form button.btn').not('.dropdown-toggle, #event-nav a, .form-signin button').on('click', function(e) { 
        console.log('link clicked');

        $('a').click(do_nothing); 


        if ($(this).hasClass('btn')) {
            $(this).prop('disabled', true);
            $(this).closest('form').submit();
        } else {
            $('form button.btn').not('.dropdown-toggle, #event-nav a, .form-signin button').prop('disabled', true);
        }

        $('.loader').show();
    });


});

For some reason this triggers the Ad Blocker extension for Chrome/Firefox/etc. Any ideas as to what would cause this?

Upvotes: 2

Views: 3772

Answers (1)

Richard Abercrombie
Richard Abercrombie

Reputation: 313

It turns out that Adblock Pro blocks ads primarily, if not only by matching against the URL.

If you are getting this error I would try to rename the file that is blocked to something else and see if the error persists.

In this case it seems that the filename 'prevent_doubleclick.js' was block based on the string 'doubleclick'.

Upvotes: 3

Related Questions