You've already forked AstralRinth
forked from didirus/AstralRinth
91 lines
2.0 KiB
HTML
91 lines
2.0 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Modrinth App Ad</title>
|
|
<script
|
|
src="https://dn0qt3r0xannq.cloudfront.net/modrinth-7JfmkEIXEp/modrinth-longform/prebid-load.js"
|
|
async
|
|
></script>
|
|
<link rel="preload" href="https://www.googletagservices.com/tag/js/gpt.js" as="script" />
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ads-container {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
#plus-link {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 0;
|
|
}
|
|
|
|
#modrinth-rail-1 {
|
|
border-radius: 1rem;
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
z-index: 2;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="ads-container">
|
|
<a id="plus-link" href="https://modrinth.com/plus" target="_blank"></a>
|
|
<div id="modrinth-rail-1" />
|
|
</div>
|
|
<script>
|
|
window.tude = window.tude || { cmd: [] };
|
|
tude.cmd.push(function () {
|
|
tude.refreshAdsViaDivMappings([
|
|
{
|
|
divId: "modrinth-rail-1",
|
|
baseDivId: "pb-slot-square-2",
|
|
},
|
|
]);
|
|
});
|
|
|
|
let lastUrl = null
|
|
window.addEventListener(
|
|
"message",
|
|
(event) => {
|
|
if (event.data.modrinthOpenUrl && window.__TAURI_INTERNALS__ && lastUrl !== event.data.modrinthOpenUrl) {
|
|
lastUrl = event.data.modrinthOpenUrl
|
|
// window.__TAURI_INTERNALS__.invoke("plugin:shell|open", {
|
|
// path: event.data.modrinthOpenUrl,
|
|
// });
|
|
|
|
setTimeout(() => {
|
|
lastUrl = null
|
|
}, 500)
|
|
}
|
|
},
|
|
false,
|
|
);
|
|
|
|
window.addEventListener("mousewheel", (event) => {
|
|
if (window.__TAURI_INTERNALS__) {
|
|
window.__TAURI_INTERNALS__.invoke("plugin:ads|scroll_ads_window", {
|
|
scroll: event.deltaY,
|
|
});
|
|
}
|
|
});
|
|
|
|
document.addEventListener("contextmenu", (event) => event.preventDefault());
|
|
</script>
|
|
</body>
|
|
</html>
|