You've already forked pages
forked from didirus/AstralRinth
Add hashing to ads
This commit is contained in:
@@ -45,9 +45,18 @@
|
||||
<body>
|
||||
<div class="ads-container">
|
||||
<div id="plus-link"></div>
|
||||
<div id="modrinth-rail-1" />
|
||||
<div id="modrinth-rail-1"></div>
|
||||
</div>
|
||||
<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: [] };
|
||||
|
||||
@@ -62,6 +71,12 @@
|
||||
tude.setPrivacySettings({
|
||||
personalizedAds: personalized ?? true,
|
||||
});
|
||||
|
||||
const hash = getCookie("modrinth-app-token");
|
||||
console.log(hash)
|
||||
tude.setIdProfile({
|
||||
e: hash,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user