MCPcopy Index your code
hub / github.com/EmulatorJS/EmulatorJS / adBlocked

Method adBlocked

data/src/emulator.js:396–406  ·  view source on GitHub ↗
(url, del)

Source from the content-addressed store, hash-verified

394
395 }
396 adBlocked(url, del) {
397 if (del) {
398 document.querySelector('div[class="ejs_ad_iframe"]').remove();
399 } else {
400 try {
401 document.querySelector('div[class="ejs_ad_iframe"]').remove();
402 } catch(e) {}
403 this.config.adUrl = url;
404 this.setupAds(this.config.adUrl, this.config.adSize[0], this.config.adSize[1]);
405 }
406 }
407 on(event, func) {
408 if (!this.functions) this.functions = {};
409 if (!Array.isArray(this.functions[event])) this.functions[event] = [];

Callers 1

loader.jsFile · 0.80

Calls 2

setupAdsMethod · 0.95
removeMethod · 0.45

Tested by

no test coverage detected