You've already forked AstralRinth
forked from didirus/AstralRinth
Fix adblock message again (#654)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="info-wrapper">
|
<div class="info-wrapper">
|
||||||
<div v-if="isBlocked" id="info-popup">
|
<div v-show="isBlocked" id="info-popup">
|
||||||
<span>
|
<span>
|
||||||
<span class="info-popup-wrap">
|
<span class="info-popup-wrap">
|
||||||
<a
|
<a
|
||||||
@@ -30,7 +30,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<script
|
<script
|
||||||
v-show="!isBlocked"
|
|
||||||
id="_carbonads_js"
|
id="_carbonads_js"
|
||||||
async
|
async
|
||||||
type="text/javascript"
|
type="text/javascript"
|
||||||
@@ -48,23 +47,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (!this.$store.state.cosmetics.notUsingBlockers) {
|
setTimeout(() => (this.isBlocked = true), 1000)
|
||||||
setTimeout(() => this.checkAds(0), 1000)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
checkAds(tries) {
|
|
||||||
if (!document.getElementById('carbonads')) {
|
|
||||||
this.isBlocked = true
|
|
||||||
|
|
||||||
if (tries < 1000) {
|
|
||||||
setTimeout(() => this.checkAds(tries + 1), 250)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$store.state.cosmetics.commit('SET_NOT_USING_BLOCKERS', true)
|
|
||||||
this.isBlocked = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -103,6 +86,10 @@ export default {
|
|||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
div:first-child:nth-last-child(3) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbonads_1 {
|
#carbonads_1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user