gtag, adsense, caching

This commit is contained in:
first@lynx.com
2026-07-23 18:43:16 -04:00
parent ddab5ca728
commit b1a1403c13
13 changed files with 436 additions and 237 deletions

View File

@ -1,6 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,6 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="sl-theme-dark" lang="en"> <html class="sl-theme-dark" lang="en">
<head>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
@ -23,11 +34,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<!-- toastify --> <!-- toastify -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3415518411898563" <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3045051195337951"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script></script> <script></script>
</head> </head>
<body>
<body>
<input type="text" class="searchbar" id="gamesearch" placeholder="Type here to search.." /> <input type="text" class="searchbar" id="gamesearch" placeholder="Type here to search.." />
<select id="gamesort"> <select id="gamesort">
<option value="az">a -> z</option> <option value="az">a -> z</option>
@ -44,5 +56,6 @@
<p id="loadingMsg">apps loading..</p> <p id="loadingMsg">apps loading..</p>
<p id="noResults">nothing was found! try a new search query.</p> <p id="noResults">nothing was found! try a new search query.</p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,5 +1,15 @@
<html> <html>
<head> <head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<script> <script>
win = window.open(); win = window.open();
win.document.body.style.margin = "0"; win.document.body.style.margin = "0";

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,16 @@
<html lang="en"> <html lang="en">
<head> <head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,6 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
@ -26,7 +37,8 @@
<!-- initialize my stuff --> <!-- initialize my stuff -->
<link rel="stylesheet" href="/css/main.css" /> <link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/pages.css" /> <link rel="stylesheet" href="/css/pages.css" />
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Mulish&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'" /> <link rel="preload" href="https://fonts.googleapis.com/css2?family=Mulish&display=swap" as="style"
onload="this.onload=null;this.rel='stylesheet'" />
<script src="/js/main.js" defer></script> <script src="/js/main.js" defer></script>
<!-- <script src="/js/widget.js"></script> --> <!-- <script src="/js/widget.js"></script> -->
<script defer> <script defer>
@ -53,10 +65,12 @@
<!-- seo + other things --> <!-- seo + other things -->
<title>Selenite</title> <title>Selenite</title>
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3415518411898563" crossorigin="anonymous"></script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3045051195337951"
</head> crossorigin="anonymous"></script>
<alerts> </alerts> </head>
<body> <alerts> </alerts>
<body>
<h1 class="title">selenite.</h1> <h1 class="title">selenite.</h1>
<noscript>enable javascript if you want the games to actually load</noscript> <noscript>enable javascript if you want the games to actually load</noscript>
<p id="randomquote">better thank me for this unblocked website</p> <p id="randomquote">better thank me for this unblocked website</p>
@ -71,5 +85,6 @@
<a target="_blank" href="https://discord.gg/7jyufnwJNf"><img src="img/discord.svg" /></a> <a target="_blank" href="https://discord.gg/7jyufnwJNf"><img src="img/discord.svg" /></a>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -2,6 +2,16 @@
<html lang="en"> <html lang="en">
<head> <head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,6 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
@ -30,6 +41,8 @@
<link rel="stylesheet" href="/css/main.css" /> <link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/pages.css" /> <link rel="stylesheet" href="/css/pages.css" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3045051195337951"
crossorigin="anonymous"></script>
<!-- seo + other things --> <!-- seo + other things -->
<title>Selenite</title> <title>Selenite</title>
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
@ -38,23 +51,30 @@
width: 60%; width: 60%;
} }
</style> </style>
</head> </head>
<alerts> </alerts> <alerts> </alerts>
<body>
<body>
<h1 class="title">information</h1> <h1 class="title">information</h1>
<h2>suggest a game!</h2> <h2>suggest a game!</h2>
<p>you may make suggestions in our <a target="_blank" href="https://discord.gg/7jyufnwJNf">discord</a> or <a href="mailto:support@selenite.cc">email our support team</a>.</p> <p>you may make suggestions in our <a target="_blank" href="https://discord.gg/7jyufnwJNf">discord</a> or <a
href="mailto:support@selenite.cc">email our support team</a>.</p>
<h2>dmca</h2> <h2>dmca</h2>
<p>please check <a href="/dmca.html">here</a> for information.</p> <p>please check <a href="/dmca.html">here</a> for information.</p>
<h2>privacy policy</h2> <h2>privacy policy</h2>
<p>please check <a href="/privacy.html">here</a> to see how we process your information.</p> <p>please check <a href="/privacy.html">here</a> to see how we process your information.</p>
<h2>credits</h2> <h2>credits</h2>
<p>whilst the majority of the work has been done by the creator, sky, selenite would not be possible without some key sources and people.</p> <p>whilst the majority of the work has been done by the creator, sky, selenite would not be possible without some
key sources and people.</p>
<p><a href="https://github.com/a456pur/seraph">seraph</a> by <a href="https://a456pur.dev">a456pur</a> (games)</p> <p><a href="https://github.com/a456pur/seraph">seraph</a> by <a href="https://a456pur.dev">a456pur</a> (games)</p>
<p><a href="https://gitlab.com/3kh0/3kh0-assets">3kh0 assets</a> by <a href="https://3kh0.com">3kh0</a> (games)</p> <p><a href="https://gitlab.com/3kh0/3kh0-assets">3kh0 assets</a> by <a href="https://3kh0.com">3kh0</a> (games)</p>
<p><a href="https://github.com/genizy/web-port">web ports</a> by <a href="https://gn-math.github.io/">gn-math</a> (games)</p> <p><a href="https://github.com/genizy/web-port">web ports</a> by <a href="https://gn-math.github.io/">gn-math</a>
<p><a href="https://github.com/genizy/web-port">more ports</a> by <a href="https://truffled.lol/">bog</a> (games)</p> (games)</p>
<p><a href="https://github.com/genizy/web-port">more ports</a> by <a href="https://truffled.lol/">bog</a> (games)
</p>
<p>even more ports by <a href="https://www.slqnt.dev/">slqnt</a> (games)</p> <p>even more ports by <a href="https://www.slqnt.dev/">slqnt</a> (games)</p>
<p><a href="https://cobalt.tools">cobalt</a> by <a href="https://github.com/imputnet">imputnet</a> (music implementation)</p> <p><a href="https://cobalt.tools">cobalt</a> by <a href="https://github.com/imputnet">imputnet</a> (music
</body> implementation)</p>
</body>
</html> </html>

View File

@ -1,6 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="sl-theme-dark" lang="en"> <html class="sl-theme-dark" lang="en">
<head> <head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,6 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,6 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="sl-theme-dark" lang="en"> <html class="sl-theme-dark" lang="en">
<head>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
@ -23,11 +34,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<!-- toastify --> <!-- toastify -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3415518411898563" <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3045051195337951"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script></script> <script></script>
</head> </head>
<body>
<body>
<input type="text" class="searchbar" id="gamesearch" placeholder="Type here to search.." /> <input type="text" class="searchbar" id="gamesearch" placeholder="Type here to search.." />
<select id="gamesort"> <select id="gamesort">
<option value="az">a -> z</option> <option value="az">a -> z</option>
@ -46,5 +58,6 @@
<p id="loadingMsg">games loading..</p> <p id="loadingMsg">games loading..</p>
<p id="noResults">nothing was found! try a new search query.</p> <p id="noResults">nothing was found! try a new search query.</p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -2,6 +2,16 @@
<html lang="en"> <html lang="en">
<head> <head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0Y3T4HN4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J0Y3T4HN4N');
</script>
<!-- initialize theme vars <!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff --> https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

36
sw.js
View File

@ -8,6 +8,12 @@ let localStorageData = {
}; };
// yandere sim big files, cuphead, ddlc assets, renpy, renpy, buckshot roulette, half life, undertale & deltarune, hollow knight // yandere sim big files, cuphead, ddlc assets, renpy, renpy, buckshot roulette, half life, undertale & deltarune, hollow knight
let cacheable_files = ["YandereSim.data", "cuphead/Build/Build.data.unityweb.", "/ddlc/game/", "/ddlcplus/game/", "/co09/game/", "/co09flipside/game/", "/co09reup/game/", "renpy.data", "game.zip", "buckshot-roulette.pck", "halva_en-", "game.unx", "bog.data", "FTFHAPort.data.unityweb", "Content.tar.part", "thats-not-my-neighbor.pck", ".unityweb", "index.data.path"]; let cacheable_files = ["YandereSim.data", "cuphead/Build/Build.data.unityweb.", "/ddlc/game/", "/ddlcplus/game/", "/co09/game/", "/co09flipside/game/", "/co09reup/game/", "renpy.data", "game.zip", "buckshot-roulette.pck", "halva_en-", "game.unx", "bog.data", "FTFHAPort.data.unityweb", "Content.tar.part", "thats-not-my-neighbor.pck", ".unityweb", "index.data.path"];
let no_long_cache_dirs = ["deltarune"];
function isNoLongCachePath(pathname) {
return no_long_cache_dirs.some(dir => pathname.includes(`/${dir}/`));
}
self.addEventListener("message", e => { self.addEventListener("message", e => {
if (e.data && e.data.type == "localStorage") { if (e.data && e.data.type == "localStorage") {
localStorageData = e.data; localStorageData = e.data;
@ -17,6 +23,36 @@ self.addEventListener("message", e => {
if (workbox) { if (workbox) {
self.skipWaiting(); self.skipWaiting();
workbox.core.clientsClaim(); workbox.core.clientsClaim();
self.addEventListener("activate", event => {
event.waitUntil(
caches.open('resources-cache').then(cache =>
cache.keys().then(requests =>
Promise.all(
requests
.filter(req => isNoLongCachePath(new URL(req.url).pathname))
.map(req => cache.delete(req))
)
)
)
);
});
workbox.routing.registerRoute(
({ url }) => {
if (!url.pathname.includes("/resources/")) return false;
return isNoLongCachePath(url.pathname);
},
new workbox.strategies.NetworkFirst({
cacheName: 'resources-cache-nocache-exceptions',
networkTimeoutSeconds: 10,
plugins: [
new workbox.expiration.ExpirationPlugin({
maxEntries: 300,
maxAgeSeconds: 60 * 60,
}),
],
})
);
workbox.routing.registerRoute( workbox.routing.registerRoute(
({ url }) => { ({ url }) => {