From 9395403389b2f1bbc73f0b7ec75ba03a2e591945 Mon Sep 17 00:00:00 2001 From: sky Date: Sun, 7 Sep 2025 16:30:15 -0400 Subject: [PATCH] fast mode and other stuff idk --- css/bookmarklets.css | 4 + css/games.css | 4 + css/loader.css | 4 + css/pages.css | 4 + css/profile.css | 4 + css/settings.css | 5 ++ css/sidebar.css | 32 +++++++ css/users.css | 4 + home.html | 1 - img/up.svg | 1 + index.html | 29 ++++++- js/all.js | 195 ------------------------------------------- js/all.min.js | 1 - js/main.js | 3 + settings.html | 14 +++- 15 files changed, 104 insertions(+), 201 deletions(-) create mode 100644 img/up.svg diff --git a/css/bookmarklets.css b/css/bookmarklets.css index 07f2416..6f8f3f3 100644 --- a/css/bookmarklets.css +++ b/css/bookmarklets.css @@ -40,4 +40,8 @@ .bookmarkletdiv { backdrop-filter: blur(0); } +} +body[fast] .bookmarkletdiv { + background-color: color-mix(in srgb, var(--color-2) 70%, #000000 30%); + backdrop-filter: blur(0); } \ No newline at end of file diff --git a/css/games.css b/css/games.css index 98844e8..ebab808 100755 --- a/css/games.css +++ b/css/games.css @@ -77,4 +77,8 @@ body { game { backdrop-filter: blur(0); } +} +body[fast] game { + background-color: color-mix(in srgb, var(--color-2) 70%, #000000 30%); + backdrop-filter: blur(0); } \ No newline at end of file diff --git a/css/loader.css b/css/loader.css index 3c62cba..3e4270c 100644 --- a/css/loader.css +++ b/css/loader.css @@ -53,4 +53,8 @@ #gamecontainer { backdrop-filter: blur(0); } +} +body[fast] #gamecontainer { + background-color: color-mix(in srgb, var(--color-2) 70%, #000000 30%); + backdrop-filter: blur(0); } \ No newline at end of file diff --git a/css/pages.css b/css/pages.css index 9afc623..b5d960a 100755 --- a/css/pages.css +++ b/css/pages.css @@ -173,4 +173,8 @@ input[type=checkbox] { #popup { backdrop-filter: blur(0); } +} +body[fast] #popup { + background-color: color-mix(in srgb, var(--color-2) 70%, #000000 30%); + backdrop-filter: blur(0); } \ No newline at end of file diff --git a/css/profile.css b/css/profile.css index 67b5855..08c1a0c 100644 --- a/css/profile.css +++ b/css/profile.css @@ -140,4 +140,8 @@ result p { section { backdrop-filter: blur(0); } +} +body[fast] section { + background-color: color-mix(in srgb, var(--color-2) 70%, #000000 30%); + backdrop-filter: blur(0); } \ No newline at end of file diff --git a/css/settings.css b/css/settings.css index 9fd09e6..3268df8 100644 --- a/css/settings.css +++ b/css/settings.css @@ -26,4 +26,9 @@ sections { section { backdrop-filter: blur(0); } +} + +body[fast] section { + background-color: color-mix(in srgb, var(--color-2) 70%, #000000 30%); + backdrop-filter: blur(0); } \ No newline at end of file diff --git a/css/sidebar.css b/css/sidebar.css index 6ed3ac4..6998f63 100755 --- a/css/sidebar.css +++ b/css/sidebar.css @@ -9,6 +9,7 @@ sidebar { flex-direction: column; align-items: center; user-select: none; + z-index: 10; } .sidebar-item { margin: 6px; @@ -56,4 +57,35 @@ iframe { .sidebar-item:hover .sidebar-item-descriptor { opacity: 1; right: 55px; +} +#bottom-menu, #open-bottom-menu { + position: absolute; + bottom: -40px; + height: 50px; + left: 0; + right: 0; + width: 30%; + margin-left: auto; + margin-right: auto; + display: flex; + justify-content: center; + align-items: center; + background-color: black; + z-index: 5; + border-radius: 10px 10px 0 0; + cursor: pointer; + color: black; +} +#open-bottom-menu { + bottom: 10px; + height: 15px; + width: 70px; + z-index: 5; +} +#bottom-menu[enabled=true] { + bottom: 10px; + color: white; +} +#open-bottom-menu[enabled=true] { + bottom: 60px; } \ No newline at end of file diff --git a/css/users.css b/css/users.css index e054d32..446e8f3 100644 --- a/css/users.css +++ b/css/users.css @@ -52,4 +52,8 @@ .users { backdrop-filter: blur(0); } +} +body[fast] .users { + background-color: color-mix(in srgb, var(--color-2) 70%, #000000 30%); + backdrop-filter: blur(0); } \ No newline at end of file diff --git a/home.html b/home.html index 258fc46..fca4f8b 100755 --- a/home.html +++ b/home.html @@ -7,7 +7,6 @@ - diff --git a/img/up.svg b/img/up.svg new file mode 100644 index 0000000..ea09945 --- /dev/null +++ b/img/up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html index 883dbd3..0b8de2e 100755 --- a/index.html +++ b/index.html @@ -56,8 +56,23 @@ @@ -134,5 +157,9 @@ +
+
+

yap yap yap

+
diff --git a/js/all.js b/js/all.js index b883268..e69de29 100755 --- a/js/all.js +++ b/js/all.js @@ -1,195 +0,0 @@ -let backup_icon; -let backup_name; -let socket; -if (location.origin.includes("https")) { - socket = new WebSocket(`wss://${location.host}/socket`); -} else { - socket = new WebSocket(`ws://${location.host}/socket`); -} -socket.addEventListener("open", (event) => { - let cookies = document.cookie.split("; "); - for (let i = 0; i < cookies.length; i++) { - if (cookies[i].trim().startsWith("token=")) { - socket.send(cookies[i].trim()); - } - } -}); -socket.addEventListener("message", (event) => { - if (event.data == "ping") { - socket.send(`pong${location.pathname.includes("/semag/") ? location.pathname.split("/")[2] : ""}`); - return; - } - if (event.data.startsWith("announce.")) { - let styles = document.createElement("style"); - styles.innerHTML = `@import url("https://fonts.googleapis.com/css2?family=Prompt:wght@300&display=swap");.announce {font-family: "Prompt", sans-serif;position: absolute;margin-left: auto;margin-right: auto;top: 10px;z-index: 10000000;background-color: #a53026;padding: 10px;width: max-content;border-radius: 10px;left:0;right:0;border-color: #f74f40;border-width: 5px;border-radius: 10px;border-style: solid;max-width: 60%;font-size: 16px;color: white;}@keyframes FadeIn {0% {opacity: 0;}100% {opacity: 1;}}@keyframes FadeOut {0% {opacity: 1;}100% {opacity: 0;}}`; - let announcement = document.createElement("div"); - announcement.innerText = event.data.substring(9); - announcement.setAttribute("class", "announce"); - announcement.style.opacity = "0"; - announcement.style.animation = "FadeIn 1s ease-in-out forwards"; - document.head.appendChild(styles); - document.body.appendChild(announcement); - setTimeout(() => { - announcement.style.animation = "FadeOut 1s ease-in-out forwards"; - setTimeout(() => { - announcement.remove(); - styles.remove(); - }, 1000); - }, 14000); - } -}); - -function setCloak(name, icon) { - var tabicon = getCookie("tabicon"); - if (tabicon || icon) { - var link = document.querySelector("link[rel~='icon']"); - if (link) { - if (link.href != icon) backup_icon = link; - while (document.querySelector("link[rel~='icon']")) { - document.querySelector("link[rel~='icon']").remove(); - } - } - var link = document.querySelector("link[rel~='shortcut icon']"); - if (link) { - if (link.href != icon) backup_icon = link; - while (document.querySelector("link[rel~='shortcut icon']")) { - document.querySelector("link[rel~='shortcut icon']").remove(); - } - } - link = document.createElement("link"); - link.rel = "icon"; - document.head.appendChild(link); - link.href = tabicon; - if (name) { - link.href = icon; - } - } - - var tabname = getCookie("tabname"); - backup_name = document.title; - if (tabname) { - document.title = tabname; - } - if (name) { - document.title = name; - } - panicMode(); -} -if (getCookie("debugging") == 1) { - const debugscript = document.createElement("script"); - debugscript.setAttribute("src", "/js/debug.js"); - document.head.append(debugscript); -} -function getCookie(cname) { - let name = cname + "="; - let decodedCookie = decodeURIComponent(document.cookie); - let ca = decodedCookie.split(";"); - for (let i = 0; i < ca.length; i++) { - let c = ca[i]; - while (c.charAt(0) == " ") { - c = c.substring(1); - } - if (c.indexOf(name) == 0) { - return c.substring(name.length, c.length); - } - } - return ""; -} -let listofchars = ""; -document.addEventListener("keydown", (e) => { - listofchars = listofchars + e.key; - if (listofchars.length > 20) { - listofchars = listofchars.substring(e.key.length); - } - if (listofchars.includes("safemode")) { - window.location.href = panicurl; - listofchars = ""; - } else if (listofchars.includes("debugplz")) { - if (getCookie("debugging") == 1) { - document.cookie = "debugging=0;"; - alert("debugging off!"); - } else { - document.cookie = "debugging=1"; - alert("debugging on!"); - } - listofchars = ""; - } -}); -function panicMode() { - panicurl = getCookie("panicurl"); - if (panicurl == "") { - panicurl = "https://google.com"; - } -} -document.addEventListener( - "DOMContentLoaded", - () => { - setCloak(); - let plausible = document.createElement("script"); - plausible.setAttribute("event-domain", location.host) - plausible.setAttribute("defer", ""); - plausible.setAttribute("src", "/js/analytics.js"); - plausible.setAttribute("data-domain", "selenite.cc"); - document.head.appendChild(plausible); - }, - false -); -if (location.pathname.substring(1).includes("semag") && localStorage.getItem("selenite.blockClose") == "true") { - window.onbeforeunload = function () { - return ""; - }; -} -addEventListener("visibilitychange", (e) => { - if (localStorage.getItem("selenite.tabDisguise") == "true") { - if (document.visibilityState === "hidden") { - setCloak("Google", "https://www.google.com/favicon.ico"); - } else { - if (!backup_icon) { - icon = document.createElement("link"); - icon.rel = "icon"; - - var link = document.querySelector("link[rel~='icon']"); - if (link) { - backup_icon = link; - while (document.querySelector("link[rel~='icon']")) { - document.querySelector("link[rel~='icon']").remove(); - } - } - var link = document.querySelector("link[rel~='shortcut icon']"); - if (link) { - backup_icon = link; - while (document.querySelector("link[rel~='shortcut icon']")) { - document.querySelector("link[rel~='shortcut icon']").remove(); - } - } - document.head.appendChild(icon); - icon.href = location.origin + "/favicon.ico"; - } else { - document.head.appendChild(backup_icon); - } - document.title = backup_name; - } - } -}); -var polyfillScript = document.createElement("script"); -polyfillScript.src = "https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?version=4.8.0"; -document.head.appendChild(polyfillScript); -function fps() { - var script = document.createElement("script"); - script.onload = function () { - var stats = new Stats(); - document.body.appendChild(stats.dom); - requestAnimationFrame(function loop() { - stats.update(); - requestAnimationFrame(loop); - }); - - localStorage.setItem("fps", true); - }; - script.src = "https://cdn.jsdelivr.net/gh/mrdoob/stats.js@master/build/stats.min.js"; - document.head.appendChild(script); -} - -if (localStorage.getItem("fps")) { - fps(); -} diff --git a/js/all.min.js b/js/all.min.js index 47f8d76..e69de29 100755 --- a/js/all.min.js +++ b/js/all.min.js @@ -1 +0,0 @@ -let backup_icon;let backup_name;let socket;if(location.origin.includes("https")){socket=new WebSocket(`wss://${location.host }/socket`)}else{socket=new WebSocket(`ws://${location.host }/socket`)}socket.addEventListener("open",(event)=>{let cookies=document.cookie.split("; ");for(let i=0;i{if(event.data=="ping"){socket.send(`pong${location.pathname.includes("/semag/")?location.pathname.split("/")[2]:""}`);return}if(event.data.startsWith("announce.")){let styles=document.createElement("style");styles.innerHTML=`@import url("https://fonts.googleapis.com/css2?family=Prompt:wght@300&display=swap");.announce {font-family: "Prompt", sans-serif;position: absolute;margin-left: auto;margin-right: auto;top: 10px;z-index: 10000000;background-color: #a53026;padding: 10px;width: max-content;border-radius: 10px;left:0;right:0;border-color: #f74f40;border-width: 5px;border-radius: 10px;border-style: solid;max-width: 60%;font-size: 16px;color: white;}@keyframes FadeIn {0% {opacity: 0;}100% {opacity: 1;}}@keyframes FadeOut {0% {opacity: 1;}100% {opacity: 0;}}`;let announcement=document.createElement("div");announcement.innerText=event.data.substring(9);announcement.setAttribute("class","announce");announcement.style.opacity="0";announcement.style.animation="FadeIn 1s ease-in-out forwards";document.head.appendChild(styles);document.body.appendChild(announcement);setTimeout(()=>{announcement.style.animation="FadeOut 1s ease-in-out forwards";setTimeout(()=>{announcement.remove();styles.remove()},1000)},14000)}});function setCloak(name,icon){var tabicon=getCookie("tabicon");if(tabicon||icon){var link=document.querySelector("link[rel~='icon']");if(link){if(link.href!=icon){backup_icon=link}while(document.querySelector("link[rel~='icon']")){document.querySelector("link[rel~='icon']").remove()}}var link=document.querySelector("link[rel~='shortcut icon']");if(link){if(link.href!=icon){backup_icon=link}while(document.querySelector("link[rel~='shortcut icon']")){document.querySelector("link[rel~='shortcut icon']").remove()}}link=document.createElement("link");link.rel="icon";document.head.appendChild(link);link.href=tabicon;if(name){link.href=icon}}var tabname=getCookie("tabname");backup_name=document.title;if(tabname){document.title=tabname}if(name){document.title=name}panicMode()}if(getCookie("debugging")==1){const debugscript=document.createElement("script");debugscript.setAttribute("src","/js/debug.js");document.head.append(debugscript)}function getCookie(cname){let name=cname+"=";let decodedCookie=decodeURIComponent(document.cookie);let ca=decodedCookie.split(";");for(let i=0;i{listofchars=listofchars+e.key;if(listofchars.length>20){listofchars=listofchars.substring(e.key.length)}if(listofchars.includes("safemode")){window.location.href=panicurl;listofchars=""}else if(listofchars.includes("debugplz")){if(getCookie("debugging")==1){document.cookie="debugging=0;";alert("debugging off!")}else{document.cookie="debugging=1";alert("debugging on!")}listofchars=""}});function panicMode(){panicurl=getCookie("panicurl");if(panicurl==""){panicurl="https://google.com"}}document.addEventListener("DOMContentLoaded",()=>{setCloak();let plausible=document.createElement("script");plausible.setAttribute("event-domain",location.host);plausible.setAttribute("defer","");plausible.setAttribute("src","/js/analytics.js");plausible.setAttribute("data-domain","selenite.cc");document.head.appendChild(plausible)},false);if(location.pathname.substring(1).includes("semag")&&localStorage.getItem("selenite.blockClose")=="true"){window.onbeforeunload=function(){return ""}}addEventListener("visibilitychange",(e)=>{if(localStorage.getItem("selenite.tabDisguise")=="true"){if(document.visibilityState==="hidden"){setCloak("Google","https://www.google.com/favicon.ico")}else{if(!backup_icon){icon=document.createElement("link");icon.rel="icon";var link=document.querySelector("link[rel~='icon']");if(link){backup_icon=link;while(document.querySelector("link[rel~='icon']")){document.querySelector("link[rel~='icon']").remove()}}var link=document.querySelector("link[rel~='shortcut icon']");if(link){backup_icon=link;while(document.querySelector("link[rel~='shortcut icon']")){document.querySelector("link[rel~='shortcut icon']").remove()}}document.head.appendChild(icon);icon.href=location.origin+"/favicon.ico"}else{document.head.appendChild(backup_icon)}document.title=backup_name}}});var polyfillScript=document.createElement("script");polyfillScript.src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?version=4.8.0";document.head.appendChild(polyfillScript);function fps(){var script=document.createElement("script");script.onload=function(){var stats=new Stats();document.body.appendChild(stats.dom);requestAnimationFrame(function loop(){stats.update();requestAnimationFrame(loop)});localStorage.setItem("fps",true)};script.src="https://cdn.jsdelivr.net/gh/mrdoob/stats.js@master/build/stats.min.js";document.head.appendChild(script)}if(localStorage.getItem("fps")){fps()} \ No newline at end of file diff --git a/js/main.js b/js/main.js index 73ebb79..fba3f0c 100755 --- a/js/main.js +++ b/js/main.js @@ -43,6 +43,9 @@ document.addEventListener("DOMContentLoaded", ()=>{ loadPJS(); cursor(); } + if(localStorage.getItem("selenite.super-fast-mode") == 'true') { + document.body.setAttribute("fast", "") + } themes(); }) diff --git a/settings.html b/settings.html index 99f5b61..d916aac 100755 --- a/settings.html +++ b/settings.html @@ -51,15 +51,22 @@ document.querySelector(`option[value="${localStorage.getItem("selenite.theme") || ""}"]`).setAttribute("selected", ""); if(localStorage.getItem("selenite.fast-mode") == 'true') { document.getElementById("fastMode").setAttribute("checked", "") - } + }; + if(localStorage.getItem("selenite.super-fast-mode") == 'true') { + document.getElementById("superFastMode").setAttribute("checked", "") + }; document.getElementById("themes").addEventListener("input", (e)=>{ localStorage.setItem("selenite.theme", e.target.value); document.body.setAttribute("theme", e.target.value); }) document.getElementById("fastMode").addEventListener("click", (e) => { localStorage.setItem("selenite.fast-mode", !(e.target.checked == false)); - alert("replace alert soon - reload to see changes"); - }) + location.reload(); + }); + document.getElementById("superFastMode").addEventListener("click", (e) => { + localStorage.setItem("selenite.super-fast-mode", !(e.target.checked == false)); + location.reload(); + }); document.getElementById("submitCloak").addEventListener("click", (e) => { localStorage.setItem("selenite.tab-cloak", JSON.stringify({ "name": document.getElementById("cloakName").value || "", @@ -91,6 +98,7 @@

toggles

+

tab cloak