diff --git a/public/home/archive/index.html b/public/home/archive/index.html index becf8ed..25d88e1 100644 --- a/public/home/archive/index.html +++ b/public/home/archive/index.html @@ -8,7 +8,6 @@ - diff --git a/public/home/clients/index.html b/public/home/clients/index.html index d06fd68..09daa87 100644 --- a/public/home/clients/index.html +++ b/public/home/clients/index.html @@ -8,7 +8,6 @@ - diff --git a/public/home/downloads/index.html b/public/home/downloads/index.html index 66628da..d1f0e6f 100644 --- a/public/home/downloads/index.html +++ b/public/home/downloads/index.html @@ -8,7 +8,6 @@ - diff --git a/public/home/game/index.html b/public/home/game/index.html index 40ff347..35c3200 100644 --- a/public/home/game/index.html +++ b/public/home/game/index.html @@ -8,7 +8,6 @@ - diff --git a/public/index.html b/public/index.html index d4f7c68..e1edd88 100644 --- a/public/index.html +++ b/public/index.html @@ -21,7 +21,6 @@ - diff --git a/public/mods/client/index.html b/public/mods/client/index.html index cb2292b..19c90f6 100644 --- a/public/mods/client/index.html +++ b/public/mods/client/index.html @@ -8,7 +8,6 @@ - diff --git a/public/mods/mods/index.html b/public/mods/mods/index.html index d4c6e06..fbbe73c 100644 --- a/public/mods/mods/index.html +++ b/public/mods/mods/index.html @@ -8,7 +8,6 @@ - diff --git a/public/mods/resourcepacks/index.html b/public/mods/resourcepacks/index.html index 4df6833..00acd6a 100644 --- a/public/mods/resourcepacks/index.html +++ b/public/mods/resourcepacks/index.html @@ -8,7 +8,6 @@ - diff --git a/public/servers/index.html b/public/servers/index.html index de5766c..53657fb 100644 --- a/public/servers/index.html +++ b/public/servers/index.html @@ -8,7 +8,6 @@ - diff --git a/public/settings/index.html b/public/settings/index.html index afaa294..060f64b 100644 --- a/public/settings/index.html +++ b/public/settings/index.html @@ -8,7 +8,6 @@ - diff --git a/public/updates/index.html b/public/updates/index.html index b9132be..cb40c55 100644 --- a/public/updates/index.html +++ b/public/updates/index.html @@ -8,7 +8,6 @@ - diff --git a/src/resources/scripts/adsense.ts b/src/resources/scripts/adsense.ts deleted file mode 100644 index 8207eb2..0000000 --- a/src/resources/scripts/adsense.ts +++ /dev/null @@ -1,5 +0,0 @@ -const adsense = document.createElement('script'); -adsense.async = true; -adsense.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1132419379737567'; -adsense.crossOrigin = 'anonymous'; -document.head.appendChild(adsense); diff --git a/src/resources/scripts/main.ts b/src/resources/scripts/main.ts index ce12026..640fab9 100644 --- a/src/resources/scripts/main.ts +++ b/src/resources/scripts/main.ts @@ -322,6 +322,14 @@ if (window.location.pathname === '/') { } */ serviceworker.register('/sw.js'); } else { + if (storage.local.get('showAds') !== false) { + const adsense = document.createElement('script'); + adsense.async = true; + adsense.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1132419379737567'; + adsense.crossOrigin = 'anonymous'; + document.head.appendChild(adsense); + } + document.addEventListener('DOMContentLoaded', () => { const profileName = document.getElementById('profile-name'); if (profileName) {