var interval; document.addEventListener("DOMContentLoaded", function () { initTime(); if (localStorage.getItem("theme")) { localStorage.setItem("selenite.theme", localStorage.getItem("theme")); localStorage.removeItem("theme"); } if (localStorage.getItem("selenite.theme")) { document.body.setAttribute("theme", localStorage.getItem("selenite.theme")); } else { document.body.setAttribute("theme", "main"); } if (document.querySelectorAll("[id=adcontainer]")) { for (let i = 0; i < document.querySelectorAll("[id=adcontainer]").length; i++) { if (Math.random() < 0.5 || localStorage.getItem("selenite.adblock") == "true") document.querySelectorAll("[id=adcontainer]")[i].innerHTML = ""; } } const iconSetting = document.querySelector("input#discordIcon"); const blockClose = document.querySelector("input#blockClose"); const openBlank = document.getElementById("blank"); if (document.querySelector("widgetbot-crate")) { if (localStorage.getItem("selenite.discordIcon") == "true") { const widget = document.querySelector("widgetbot-crate"); widget.setAttribute("style", "display:none"); } } if (document.querySelector("input#discordIcon")) { if (localStorage.getItem("selenite.discordIcon") == "true") { iconSetting.checked = true; } iconSetting.addEventListener("click", () => { localStorage.setItem("selenite.discordIcon", iconSetting.checked); }); } if (document.querySelector("input#blockClose")) { if (localStorage.getItem("selenite.blockClose") == "true") { blockClose.checked = true; } blockClose.addEventListener("click", () => { localStorage.setItem("selenite.blockClose", blockClose.checked); }); } if (document.querySelector("input#tabDisguise")) { if (localStorage.getItem("selenite.tabDisguise") == "true") { tabDisguise.checked = true; } tabDisguise.addEventListener("click", () => { localStorage.setItem("selenite.tabDisguise", tabDisguise.checked); }); } document.getElementById("blank").addEventListener("click", () => { win = window.open(); win.document.body.style.margin = "0"; win.document.body.style.height = "100vh"; html = `
`; win.document.querySelector("html").innerHTML = html; win.eval(`let selenite = document.getElementById("selenite");console.log(selenite);selenite.setAttribute("src", "${location.origin}");console.log(selenite);document.getElementById("goBack").addEventListener("click", function () {selenite.contentDocument.location.href = selenite.contentDocument.location.origin;});document.getElementById("reload").addEventListener("click", function () {selenite.contentDocument.location.href = selenite.contentDocument.location.href;})`); location.href = "https://google.com"; close(); }); if ($("#panicmode").length > 0) { $("#panicmode").prop({ href: panicurl }); } if ($(".seleniteminified").length > 0) { $.get("https://raw.githubusercontent.com/skysthelimitt/selenite-optimized/main/build/bookmark.txt", function (data) { $(".seleniteminified").prop({ href: data }); }); $.get("https://raw.githubusercontent.com/car-axle-client/car-axle-client/v9/dist/build.js", function (data) { $(".caraxle").prop({ href: `javascript:${encodeURI(data)}` }); }); } if(document.body) { for(let i = 0;i<10;i++) { setTimeout(() => { crate.options.color = getComputedStyle(document.body).getPropertyValue("--uibg"); }, 100) } } }); function setPanicMode() { if (!$("#panic").val().startsWith("https")) { document.cookie = "panicurl=https://" + $("#panic").val(); return; } document.cookie = "panicurl=" + $("#panic").val(); } function copyToClipboard(text) { navigator.clipboard.writeText(text); alert("Copied text!"); } function setTheme(theme) { localStorage.setItem("selenite.theme", theme); document.body.setAttribute("theme", theme); if (theme != "custom") { document.getElementById("customMenu").style.display = "none"; document.body.style = ""; } } function setPanicMode() { if (!$("#panic").val().startsWith("https")) { document.cookie = "panicurl=https://" + $("#panic").val(); return; } document.cookie = "panicurl=" + $("#panic").val(); } function setPassword() { localStorage.setItem("selenite.password", enc.encode(document.getElementById("pass").value)); } function delPassword() { location.hash = ""; localStorage.removeItem("selenite.passwordAtt"); localStorage.removeItem("selenite.password"); } function getCurrentTime() { const n = document.getElementById("time"); fetch("https://worldtimeapi.org/api/ip") .then(response => response.json()) .then(data => { const t = new Date(data.utc_datetime); const formattedTime = t.toLocaleTimeString(undefined, { hour: "numeric", minute: "numeric", second: "numeric", hour12: true }); n.textContent = formattedTime; }) .catch(() => { const currentTime = new Date(); const formattedTime = currentTime.toLocaleTimeString(undefined, { hour: "numeric", minute: "numeric", second: "numeric", hour12: true }); n.textContent = formattedTime; }); } getCurrentTime(); setInterval(getCurrentTime, 900); $(function() { $('.game').on('error', function() { $(this).attr('src', decodeURIComponent(atob('aHR0cHM6Ly93ZWIuYXJjaGl2ZS5vcmcvd2ViLzIwMjQwMzEyMDA1NTQ3aWZfL2h0dHBzOi8vbmF0ZS1nYW1lcy5jb20vc3RhdGljL2ltYWdlLXBsYWNlaG9sZGVyLnN2Zw=='))); }); }); $(document).ready(function(){$("#webicon").attr("placeholder",window.location.href);}); let cookieConsentScript = document.createElement("script"); cookieConsentScript.src = "/js/cookieConsent.js"; document.head.appendChild(cookieConsentScript); let cookieConsentStyle = document.createElement("link"); cookieConsentStyle.href = "/js/cookieConsent.css"; cookieConsentStyle.rel = "stylesheet"; document.head.appendChild(cookieConsentStyle);