You've already forked AstralRinth
forked from didirus/AstralRinth
More ads test
This commit is contained in:
@@ -49,16 +49,6 @@
|
|||||||
<div id="modrinth-rail-1"></div>
|
<div id="modrinth-rail-1"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function getCookie(name) {
|
|
||||||
function escape(s) {
|
|
||||||
return s.replace(/([.*+?\^$(){}|\[\]\/\\])/g, "\\$1");
|
|
||||||
}
|
|
||||||
|
|
||||||
const match = document.cookie.match(RegExp("(?:^|;\\s*)" + escape(name) + "=([^;]*)"));
|
|
||||||
return match ? match[1] : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function initAds(personalized) {
|
|
||||||
window.tude = window.tude || { cmd: [] };
|
window.tude = window.tude || { cmd: [] };
|
||||||
|
|
||||||
window.Raven = window.Raven || { cmd: [] };
|
window.Raven = window.Raven || { cmd: [] };
|
||||||
@@ -79,26 +69,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
tude.setPrivacySettings({
|
|
||||||
personalizedAds: personalized ?? true,
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (window.__TAURI_INTERNALS__) {
|
|
||||||
window.__TAURI_INTERNALS__
|
|
||||||
.invoke("plugin:ads|get_ads_personalization", {})
|
|
||||||
.then(initAds)
|
|
||||||
.catch(() => initAds(true));
|
|
||||||
} else {
|
|
||||||
initAds(true);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
initAds(true);
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"message",
|
"message",
|
||||||
|
|||||||
@@ -50,16 +50,6 @@
|
|||||||
<div id="modrinth-rail-1"></div>
|
<div id="modrinth-rail-1"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function getCookie(name) {
|
|
||||||
function escape(s) {
|
|
||||||
return s.replace(/([.*+?\^$(){}|\[\]\/\\])/g, "\\$1");
|
|
||||||
}
|
|
||||||
|
|
||||||
const match = document.cookie.match(RegExp("(?:^|;\\s*)" + escape(name) + "=([^;]*)"));
|
|
||||||
return match ? match[1] : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function initAds(personalized) {
|
|
||||||
window.tude = window.tude || { cmd: [] };
|
window.tude = window.tude || { cmd: [] };
|
||||||
|
|
||||||
window.Raven = window.Raven || { cmd: [] };
|
window.Raven = window.Raven || { cmd: [] };
|
||||||
@@ -80,27 +70,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
tude.setPrivacySettings({
|
|
||||||
personalizedAds: personalized ?? true,
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (window.__TAURI_INTERNALS__) {
|
|
||||||
window.__TAURI_INTERNALS__
|
|
||||||
.invoke("plugin:ads|get_ads_personalization", {})
|
|
||||||
.then(initAds)
|
|
||||||
.catch(() => initAds(true));
|
|
||||||
} else {
|
|
||||||
initAds(true);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
initAds(true);
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"message",
|
"message",
|
||||||
(event) => {
|
(event) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user