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

Function showInterstitialIfReady

src/utils/helpers.js:296–307  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294 return Boolean(!config.HAS_PRO && adRewards.canShowAds());
295 },
296 async showInterstitialIfReady() {
297 if (!this.canShowAds()) return false;
298 if (
299 typeof interstitialAd?.isLoaded === "function" &&
300 typeof interstitialAd?.show === "function" &&
301 (await interstitialAd?.isLoaded())
302 ) {
303 interstitialAd.show();
304 return true;
305 }
306 return false;
307 },
308 /**
309 * Displays ad on the current page
310 */

Callers

nothing calls this directly

Calls 2

isLoadedMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected