MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / showAd

Function showAd

src/utils/helpers.js:311–321  ·  view source on GitHub ↗

* Displays ad on the current page

()

Source from the content-addressed store, hash-verified

309 * Displays ad on the current page
310 */
311 showAd() {
312 if (!this.canShowAds()) return;
313 if (innerHeight * devicePixelRatio <= 600) return;
314 if (!bannerAd || typeof bannerAd.show !== "function") return;
315
316 const $page = tag.getAll("wc-page:not(#root)").pop();
317 if ($page) {
318 bannerAd.active = true;
319 bannerAd.show();
320 }
321 },
322 async toInternalUri(uri) {
323 return new Promise((resolve, reject) => {
324 window.resolveLocalFileSystemURL(

Callers

nothing calls this directly

Calls 1

showMethod · 0.45

Tested by

no test coverage detected