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

Function loadAd

src/pages/plugin/plugin.js:568–580  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

566 }
567
568 async function loadAd(el) {
569 if (!helpers.canShowAds()) return;
570 try {
571 if (!(await interstitialAd?.isLoaded())) {
572 const oldText = el.textContent;
573 el.textContent = strings["loading..."];
574 await interstitialAd?.load();
575 el.textContent = oldText;
576 }
577 } catch (error) {
578 console.warn("Failed to load plugin page ad.", error);
579 }
580 }
581
582 async function getPurchase(sku) {
583 const purchases = await helpers.promisify(iap.getPurchases);

Callers 2

installFunction · 0.70
uninstallFunction · 0.70

Calls 2

isLoadedMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected