Mostly accessibility stuff (#344)

This commit is contained in:
stairman06 authored and GitHub committed 2022-01-20 21:21:13 -07:00
1 parent 98c85441f8
commit 643cd87706
13 files changed
+212 -162

No files matched your search

+12 -7
View File
@@ -79,6 +79,7 @@ export default {
onSmallScreen: false,
windowResizeListenerDebounce: null,
ethicalAdLoad: null,
ethicalAdTries: 0,
}
},
head: {
@@ -165,14 +166,18 @@ export default {
},
refresh_ad() {
if (this.ethical_ads_on) {
this.ethicalAdTries++
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)
if (this.ethicalAdTries <= 5) {
this.ethicalAdLoad = setTimeout(() => {
if (typeof window.ethicalads === 'undefined') {
console.log('EthicalAds are not loaded yet, retrying...')
this.refresh_ad()
}
ethicalads.load()
}, 100)
}
}
},
},