문제

Well, we have a page running RequireJS, which loads the dependencies, creates the approuter and well, all backbone load.

On html page, we load :

<script>
    require.config({
     baseUrl: "/source/js"
    });
    require(["/source/js/main.js"], function() {
        alert('Done') ;
    }) ;
</ script>

And this, in principle does not fail (Say 'Done'), but it does not run any more. It not executes the code (In main.js):

require(
   ['routers/approuter',
     'shared'
   ],
function(AppRouter, SharedObject){
    var app_router = new AppRouter;
    etc.....

This happens only with AdBlocks, not with AdBlocks Plus. We don't have ads in the web, only require.js loading Backbone, making calls to the api and returning small pieces of json :(

I not know if could give useful information for assistance, does not load the whole site .... we are in trouble :(


Typical, solved:

Simply by having a js file called 'promotionaddform.js' adblocks blocking the entire page. .... Beware of filenames!...

Sorry for the post :(

도움이 되었습니까?

해결책

Loading scripts with certain filenames causes AdBlocks to stop execution of JavaScript on that page.

One such example is promotionaladdform.js.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top