You've already forked AstralRinth
forked from didirus/AstralRinth
Fixed issue where ads would not show in some places. (#216)
This commit is contained in:
@@ -78,6 +78,7 @@ export default {
|
|||||||
displayed: false,
|
displayed: false,
|
||||||
onSmallScreen: false,
|
onSmallScreen: false,
|
||||||
windowResizeListenerDebounce: null,
|
windowResizeListenerDebounce: null,
|
||||||
|
ethicalAdLoad: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -151,8 +152,15 @@ export default {
|
|||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
refresh_ad() {
|
refresh_ad() {
|
||||||
if (this.ethical_ads_on && typeof window.ethicalads !== 'undefined') {
|
if (this.ethical_ads_on) {
|
||||||
ethicalads.load()
|
clearTimeout(this.ethicalAdLoad)
|
||||||
|
this.ethicalAdLoad = setTimeout(() => {
|
||||||
|
if (typeof window.ethicalads === 'undefined') {
|
||||||
|
console.log('EthicalAds are not loaded yet, retrying...')
|
||||||
|
this.refresh_ad()
|
||||||
|
}
|
||||||
|
ethicalads.load()
|
||||||
|
}, 100)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user