()
| 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 | */ |