mobile support, idek

This commit is contained in:
sky
2025-08-17 19:13:08 -04:00
parent b6c7d612a4
commit f99c78c0a8
26 changed files with 146 additions and 12000 deletions

View File

@ -15,6 +15,7 @@
<meta property="og:description" content="Selenite is the best unblocked games site. With over 400 games and an account system, no other websites come close to Selenite." />
<meta property="og:title" content="Selenite">
<meta property="og:type" content="website">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="application/ld+json">
{
@ -34,18 +35,60 @@
</script>
<!-- initialize my stuff -->
<script src="/js/all.js"></script>
<script src="/js/all.min.js"></script>
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/sidebar.css" />
<link rel="manifest" href="/manifest.json" />
<!-- seo + other things -->
<style>
@media screen and (max-width: 660px) {
iframe, sidebar {
display: none;
}
mobile-warning {
display: flex;
}
}
</style>
<title>Selenite</title>
<link rel="icon" href="/favicon.ico" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3415518411898563" crossorigin="anonymous"></script>
<link rel="icon" href="/favicon.ico" id="favicon" />
<!-- <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3415518411898563" crossorigin="anonymous"></script> -->
<script>
let currentPanic = {key: "", url: ""};
document.addEventListener("DOMContentLoaded", ()=>{
let currentCloak = {name: "", icon: ""};
setInterval(()=>{
if(localStorage.getItem("selenite.tab-cloak")) {
let cloak = JSON.parse(localStorage.getItem("selenite.tab-cloak"));
if((cloak.name != currentCloak.name) || (cloak.icon != currentCloak.icon)) {
document.title = cloak.name.length > 0 ? cloak.name : "Selenite"
document.getElementById("favicon").href = cloak.icon.length > 0 ? "https://s2.googleusercontent.com/s2/favicons?domain_url=" + cloak.icon : "favicon.ico"
currentCloak = cloak;
}
};
if(localStorage.getItem("selenite.panic-mode")) {
let panic = JSON.parse(localStorage.getItem("selenite.panic-mode"));
if((panic.key != currentPanic.key) || (panic.url != currentPanic.url)) {
currentPanic = panic;
}
}
}, 500);
document.addEventListener("keydown", (e) => {
if(currentPanic.key.length > 0 && currentPanic.url.length > 0) {
if(e.key = currentPanic.key) {
location.href = currentPanic.url;
}
}
})
document.getElementById("iframe").contentWindow.document.addEventListener("keydown", (e) => {
if(currentPanic.key.length > 0 && currentPanic.url.length > 0) {
if(e.key = currentPanic.key) {
location.href = currentPanic.url;
}
}
})
document.getElementById("iframe").addEventListener("load", () => {
document.getElementById("iframe").contentWindow.addEventListener("beforeunload", () => {
alert("unloading! show loading bar")
@ -75,6 +118,7 @@
})
</script>
</head>
<mobile-warning><h1 class="title">your device is not supported!</h1><p>please rotate your screen for the best experience.</p></mobile-warning>
<body>
<iframe id="iframe" src="home.html"></iframe>
<!-- to do