Fix ads init
This commit is contained in:
parent
624abf0df4
commit
a46677832b
@ -48,23 +48,26 @@
|
|||||||
<div id="modrinth-rail-1" />
|
<div id="modrinth-rail-1" />
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
window.__TAURI_INTERNALS__.invoke("plugin:ads|get_ads_personalization", {})
|
function initAds(personalized) {
|
||||||
.then((personalized) => {
|
window.tude = window.tude || { cmd: [] };
|
||||||
window.tude = window.tude || { cmd: [] };
|
|
||||||
|
|
||||||
tude.cmd.push(function () {
|
tude.cmd.push(function () {
|
||||||
tude.refreshAdsViaDivMappings([
|
tude.refreshAdsViaDivMappings([
|
||||||
{
|
{
|
||||||
divId: "modrinth-rail-1",
|
divId: "modrinth-rail-1",
|
||||||
baseDivId: "pb-slot-square-2",
|
baseDivId: "pb-slot-square-2",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
tude.setPrivacySettings({
|
tude.setPrivacySettings({
|
||||||
personalizedAds: personalized ?? true,
|
personalizedAds: personalized ?? true,
|
||||||
})
|
})
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.__TAURI_INTERNALS__.invoke("plugin:ads|get_ads_personalization", {})
|
||||||
|
.then(initAds)
|
||||||
|
.catch(() => initAds(true));
|
||||||
|
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"message",
|
"message",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user