S
S
speculant2018-08-15 13:49:45
JavaScript
speculant, 2018-08-15 13:49:45

Why, if adblock is installed in firefox, the script is not executed?

Hello, such a problem, if the adblock add-on is enabled in firefox (even if the site is whitelisted), then part of my script is simply not executed, but it’s worth turning off the add-on and everything works fine. In chrome with the same add-ons everything works fine. What could be the problem?

Gives such an error
TypeError: name is undefined
in this variable I store data from JSON.
Which I receive in advance in this way

$.get({
         url: "***.json",
         dataType: "json",
         success: function(data) {
             name = data;
        }
});

and then I call it like this
$(document).ready( function(){
name[***][***][***][***][***]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2018-08-15
@speculant

Check if the request is running. If it says that name is undefined, then your success in ajax is not performed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question