Open danielleevandenbosch opened 3 years ago
Could you please explain? Not sure to understand.
Came here looking for this too. I needed something to remove console.log statements from within script tags inside .html files, not .js files.
This doesn't seem to quite work and it ended out stripping out too much, It turned this:
if(mraid.getState() === 'loading') {
console.log('mraid.getState is loading, setting up ready event listener')
mraid.addEventListener("ready", () => tryLaunching({ launchGame: true }));
} else if (mraid.getState() === 'default') {
console.log('mraid.getState is default, attempting to launch playable')
tryLaunching({ launchGame: true });
}
Into this and actually removed everything in the if/else blocks:
if(mraid.getState() === 'loading') {
0;
} else if (mraid.getState() === 'default') {
0;
}
I also had to at least add replaceWith='0;'
as an option, or it created problematic stuff like this:
} else
startApp();
launched = true;
...if you had a dangling else:
} else
console.log('Skipping MRAID orientation properties before launch attempt');
Would it be possible to add to the package whether javascript outside of a js file is supported?
Like the javascript between 2 script tags?