mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-16 10:32:08 -05:00
clean up code a little bit - preparing for school to start
This commit is contained in:
parent
cc5f91beac
commit
59cfed7dbd
65
index.html
65
index.html
@ -1,6 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<!-- initialize theme vars -->
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--input-bg-color: #00000000;
|
--input-bg-color: #00000000;
|
||||||
@ -14,55 +15,54 @@
|
|||||||
--invert-logo: 0;
|
--invert-logo: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="./js/themes.js" defer></script>
|
|
||||||
<script src="/js/all.js"></script>
|
<!-- initialize externals -->
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"/>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
|
||||||
|
<style>@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");</style>
|
||||||
|
|
||||||
|
<!-- initialize my stuff -->
|
||||||
|
<script src="/js/themes.js"></script>
|
||||||
|
<script src="/js/all.js"></script>
|
||||||
|
<script src="/js/cookie.js"></script>
|
||||||
|
<script src="/js/games.js"></script>
|
||||||
|
<script src="/js/search.js"></script>
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
<link rel="stylesheet" href="/style.css" />
|
<link rel="stylesheet" href="/style.css" />
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css" />
|
<!-- seo + other things -->
|
||||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<title>Selenite</title>
|
<title>Selenite</title>
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<meta name="keywords" content="front-end web developer, unblocked, games, google sites, unblocked games mom, ublocked, code, coding, programmer, development, javascript, jquery, bootstrap, sass, less, git, gaming, internet, website, best, site, cool, free games" />
|
<meta name="keywords" content="front-end web developer, unblocked, games, google sites, unblocked games mom, ublocked, code, coding, programmer, development, javascript, jquery, bootstrap, sass, less, git, gaming, internet, website, best, site, cool, free games"/>
|
||||||
<meta property="og:title" content="Welcome to Selenite." />
|
<meta property="og:title" content="Welcome to Selenite." />
|
||||||
<meta property="og:site_name" content="https://Selenite.pages.dev" />
|
<meta property="og:site_name" content="https://Selenite.pages.dev" />
|
||||||
<meta property="og:description" content="Welcome to the one and only option for unblocked games. Welcome to Selenite." />
|
<meta property="og:description" content="Welcome to the one and only option for unblocked games. Welcome to Selenite."/>
|
||||||
<meta name="description" content="Welcome to the one and only option for unblocked games. Welcome to Selenite." />
|
<meta name="description" content="Welcome to the one and only option for unblocked games. Welcome to Selenite."/>
|
||||||
<meta name="author" content="Website Creator" />
|
<meta name="author" content="Website Creator" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
|
|
||||||
|
|
||||||
<script src="./js/cookie.js"></script>
|
|
||||||
<script src="./js/games.js"></script>
|
|
||||||
<script src="./js/search.js"></script>
|
|
||||||
<script src="./js/main.js"></script>
|
|
||||||
|
|
||||||
|
<!-- toastify -->
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
Toastify({
|
Toastify({
|
||||||
text: 'Type "safemode" while in any game to return to Google! Change the website in the settings.',
|
text: 'Type "safemode" while in any game to return to Google! Change the website in the settings.',
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
gravity: "top", // `top` or `bottom`
|
gravity: "top",
|
||||||
position: "left", // `left`, `center` or `right`
|
position: "left",
|
||||||
style: {
|
style: {
|
||||||
background: "linear-gradient(var(--bg-1), var(--bg-2))",
|
background: "linear-gradient(var(--bg-1), var(--bg-2))",
|
||||||
width: "25%",
|
width: "25%",
|
||||||
boxShadow: "0px 0px 5px 5px var(--input-bg-color)",
|
boxShadow: "0px 0px 5px 5px var(--input-bg-color)",
|
||||||
},
|
},
|
||||||
onClick: function () {}, // Callback after click
|
onClick: function () {},
|
||||||
}).showToast();
|
}).showToast();});
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<progress id="progressbar"></progress>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="display: none;">
|
<body style="display: none">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="./index.html">Home</a></li>
|
<li><a href="./index.html">Home</a></li>
|
||||||
@ -76,23 +76,30 @@
|
|||||||
<input class="hiddenUpload" type="file" accept=".save" hidden />
|
<input class="hiddenUpload" type="file" accept=".save" hidden />
|
||||||
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img src="./new.svg" style="width: 4%; padding-right: 1%; filter: invert(var(--invert-logo, 0))" />
|
<img src="./new.svg" style=" width: 4%; padding-right: 1%; filter: invert(var(--invert-logo, 0));"/>
|
||||||
<h2 style="font-size: 70px">selenite</h2>
|
<h2 style="font-size: 70px">selenite</h2>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:downloadMainSave()">Download Save</a><a href="javascript:uploadMainSave()">Upload Save</a>
|
|
||||||
<br />
|
<a href="javascript:downloadMainSave()">Download Save</a>
|
||||||
<p id="gamecounter"></p>
|
<a href="javascript:uploadMainSave()">Upload Save</a>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
<input type="text" id="gamesearch" placeholder="Type here to search.." />
|
<input type="text" id="gamesearch" placeholder="Type here to search.." />
|
||||||
<button id="random" onclick="selectRandomGame()">Click to play a random game!</button>
|
<button id="random" onclick="selectRandomGame()">Click to play a random game!</button>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<h2>Pinned Games</h2>
|
<h2>Pinned Games</h2>
|
||||||
<div id="pinnedgames"></div>
|
<div id="pinnedgames"></div>
|
||||||
<p id="pinnedmessage">It looks like you haven't pinned any games, click the star icon next to any game in order to pin them up here! Your pinned games will also save in your save backups!</p>
|
<p id="pinnedmessage">It looks like you haven't pinned any games, click the star icon next to any game in order to pin them up here! Your pinned games will also save in your save backups!</p>
|
||||||
|
|
||||||
<div id="games">
|
<div id="games">
|
||||||
<h2>All Games</h2>
|
<h2>All Games</h2>
|
||||||
<p id="message">Please wait for the games to load.. If you see this for more than a second, try reloading and reporting a <a href="https://forms.gle/j75WUn6UhdqsRZgf7">bug report</a>.</p>
|
<p id="message">Please wait for the games to load.. If you see this for more than a second, try reloading and reporting a <a href="https://forms.gle/j75WUn6UhdqsRZgf7">bug report</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
37
js/all.js
37
js/all.js
@ -1,6 +1,5 @@
|
|||||||
function setCloak() {
|
function setCloak() {
|
||||||
var tabicon = getCookie("tabicon");
|
var tabicon = getCookie("tabicon");
|
||||||
|
|
||||||
if (tabicon) {
|
if (tabicon) {
|
||||||
var link = document.querySelector("link[rel~='icon']");
|
var link = document.querySelector("link[rel~='icon']");
|
||||||
if (link) {
|
if (link) {
|
||||||
@ -21,6 +20,7 @@ function setCloak() {
|
|||||||
if (tabname) {
|
if (tabname) {
|
||||||
document.title = tabname;
|
document.title = tabname;
|
||||||
}
|
}
|
||||||
|
panicMode();
|
||||||
}
|
}
|
||||||
function getCookie(cname) {
|
function getCookie(cname) {
|
||||||
let name = cname + "=";
|
let name = cname + "=";
|
||||||
@ -43,9 +43,6 @@ function panicMode() {
|
|||||||
if (panicurl == "") {
|
if (panicurl == "") {
|
||||||
panicurl = "https://google.com";
|
panicurl = "https://google.com";
|
||||||
}
|
}
|
||||||
if ($("#panicmode").length > 0) {
|
|
||||||
$("#panicmode").prop({ href: panicurl });
|
|
||||||
}
|
|
||||||
const pressed = [];
|
const pressed = [];
|
||||||
const secretCode = "safemode";
|
const secretCode = "safemode";
|
||||||
window.addEventListener("keyup", (e) => {
|
window.addEventListener("keyup", (e) => {
|
||||||
@ -56,13 +53,29 @@ function panicMode() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
|
||||||
let jquery_loader = document.createElement("script");
|
window.onload = function() {
|
||||||
jquery_loader.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js");
|
|
||||||
jquery_loader.async = false;
|
|
||||||
document.body.appendChild(jquery_loader);
|
|
||||||
window.addEventListener("load", function () {
|
|
||||||
panicMode();
|
|
||||||
});
|
|
||||||
setCloak();
|
setCloak();
|
||||||
|
if (!window.jQuery) {
|
||||||
|
var head = document.getElementsByTagName('head')[0];
|
||||||
|
var script = document.createElement('script');
|
||||||
|
script.type = 'text/javascript';
|
||||||
|
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js';
|
||||||
|
head.appendChild(script);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
defer(function () {
|
||||||
|
panicMode();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function defer(method) {
|
||||||
|
if (window.jQuery) {
|
||||||
|
console.log("jquery found.");
|
||||||
|
panicMode();
|
||||||
|
} else {
|
||||||
|
setTimeout(function() { defer(method) }, 50);
|
||||||
|
console.log("jquery not found, adding jquery.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -4,10 +4,9 @@ function check() {
|
|||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
const body = document.querySelector("body");
|
const body = document.querySelector("body");
|
||||||
body.style.removeProperty("display");
|
body.style.removeProperty("display");
|
||||||
const html = document.querySelector("body");
|
}
|
||||||
html.style.removeProperty("background-color");
|
if ($("#panicmode").length > 0) {
|
||||||
const bar = document.querySelector("progress");
|
$("#panicmode").prop({ href: panicurl });
|
||||||
bar.remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user