Skip to content

Commit f6ef4fd

Browse files
committed
ad fix (check unblock, not enabled)
1 parent 7c6c9b4 commit f6ef4fd

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

src/routes/+layout.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
let useGA4 = $state(false);
1818
let mounted = $state(false);
1919
let adsEnabled = $state(false);
20+
let adblockEnabled = $state(SessionState.adBlockEnabled);
2021
let isAHost = $state(false);
2122
2223
onMount(() => {
2324
mounted = true;
2425
if (browser) {
2526
initializeTooling().then(() => {
2627
adsEnabled = SessionState.adsEnabled;
28+
adblockEnabled = SessionState.adBlockEnabled;
2729
});
2830
isAHost = State.isAHost();
2931
let hostname = window.location.hostname;
@@ -96,7 +98,7 @@
9698
<ServerSwitcher />
9799
{/if}
98100

99-
{#if (!isAHost && adsEnabled)}
101+
{#if (!isAHost && !adblockEnabled)}
100102
<script
101103
type="text/javascript"
102104
src="//pl27945770.effectivegatecpm.com/b0/88/ed/b088ed7c9240db179822a126a078b258.js"

src/routes/+page.svelte

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"//pl27945791.effectivegatecpm.com/f9/0f/48/f90f487cd8f3cdf83690f6955c1b5655.js";
3333
document.body.appendChild(script);
3434
}
35-
if ((!isAHost && adsEnabled)) {
35+
if ((!isAHost && !adblockEnabled)) {
3636
console.log("[R][LAYOUT][BASE] Bad Ads enabled");
3737
injectBadAds();
3838
} else {
@@ -43,16 +43,16 @@
4343
}
4444
}
4545
46-
var chars = "~!@#$%^&*()_+{}|:'<>?`1234567890-=[]\\;/.,";
46+
// var chars = "~!@#$%^&*()_+{}|:'<>?`1234567890-=[]\\;/.,";
4747
48-
if (browser && window.innerWidth > 800) {
49-
setInterval(() => {
50-
streamingContent +=
51-
chars.split("")[Math.floor(Math.random() * chars.length)];
48+
// if (browser && window.innerWidth > 800) {
49+
// setInterval(() => {
50+
// streamingContent +=
51+
// chars.split("")[Math.floor(Math.random() * chars.length)];
5252
53-
streamingContent = streamingContent.slice(-75);
54-
}, 50);
55-
}
53+
// streamingContent = streamingContent.slice(-75);
54+
// }, 50);
55+
// }
5656
});
5757
</script>
5858

@@ -173,7 +173,7 @@
173173
</div>
174174
</footer>
175175
<div class="streaming-console">
176-
<code>{streamingContent}</code>
176+
<!-- <code>{streamingContent}</code> -->
177177
</div>
178178

179179
<style>

static/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-10-29T02:33:34.654Z
1+
2025-10-29T02:43:01.851Z

0 commit comments

Comments
 (0)