rev.iq support

This commit is contained in:
Jai A 2024-09-04 09:23:18 -07:00
parent e69337a1fc
commit 76c93c767d
No known key found for this signature in database
GPG Key ID: 9A9F9B7250E9883C
3 changed files with 1962 additions and 22 deletions

View File

@ -13,7 +13,7 @@
<div
class="absolute top-0 flex items-center justify-center overflow-hidden rounded-2xl bg-bg-raised"
>
<div id="modrinth-rail-1" />
<div id="project-rail" />
</div>
</div>
</template>
@ -23,7 +23,9 @@ import { ChevronRightIcon } from "@modrinth/assets";
useHead({
script: [
{
src: "https://dn0qt3r0xannq.cloudfront.net/modrinth-7JfmkEIXEp/modrinth-longform/prebid-load.js",
type: "module",
src: "//js.rev.iq",
"data-domain": "modrinth.com",
async: true,
},
{
@ -31,25 +33,6 @@ useHead({
async: true,
},
],
link: [
{
rel: "preload",
as: "script",
href: "https://www.googletagservices.com/tag/js/gpt.js",
},
],
});
onMounted(() => {
window.tude = window.tude || { cmd: [] };
tude.cmd.push(function () {
tude.refreshAdsViaDivMappings([
{
divId: "modrinth-rail-1",
baseDivId: "pb-slot-square-2",
},
]);
});
});
</script>
<style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Modrinth App Ad</title>
<script
type="module"
src="//js.rev.iq"
data-domain="modrinth.com"
async
></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="project-rail" />
</div>
<script>
window.addEventListener(
"message",
(event) => {
if (event.data.modrinthOpenUrl && window.__TAURI_INTERNALS__) {
window.__TAURI_INTERNALS__.invoke("plugin:shell|open", {
path: event.data.modrinthOpenUrl,
});
}
},
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>