mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-16 02:22:07 -05:00
clean up code a little bit - preparing for school to start
This commit is contained in:
parent
cc5f91beac
commit
59cfed7dbd
55
index.html
55
index.html
@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars -->
|
||||
<style>
|
||||
:root {
|
||||
--input-bg-color: #00000000;
|
||||
@ -14,19 +15,25 @@
|
||||
--invert-logo: 0;
|
||||
}
|
||||
</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://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>Selenite</title>
|
||||
<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"/>
|
||||
@ -36,33 +43,26 @@
|
||||
<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="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>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
Toastify({
|
||||
text: 'Type "safemode" while in any game to return to Google! Change the website in the settings.',
|
||||
duration: 3000,
|
||||
gravity: "top", // `top` or `bottom`
|
||||
position: "left", // `left`, `center` or `right`
|
||||
gravity: "top",
|
||||
position: "left",
|
||||
style: {
|
||||
background: "linear-gradient(var(--bg-1), var(--bg-2))",
|
||||
width: "25%",
|
||||
boxShadow: "0px 0px 5px 5px var(--input-bg-color)",
|
||||
},
|
||||
onClick: function () {}, // Callback after click
|
||||
}).showToast();
|
||||
});
|
||||
onClick: function () {},
|
||||
}).showToast();});
|
||||
</script>
|
||||
<progress id="progressbar"></progress>
|
||||
</head>
|
||||
|
||||
<body style="display: none;">
|
||||
<body style="display: none">
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li><a href="./index.html">Home</a></li>
|
||||
@ -76,23 +76,30 @@
|
||||
<input class="hiddenUpload" type="file" accept=".save" hidden />
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<a href="javascript:downloadMainSave()">Download Save</a><a href="javascript:uploadMainSave()">Upload Save</a>
|
||||
<br />
|
||||
<p id="gamecounter"></p>
|
||||
|
||||
<a href="javascript:downloadMainSave()">Download Save</a>
|
||||
<a href="javascript:uploadMainSave()">Upload Save</a>
|
||||
|
||||
<br>
|
||||
|
||||
<input type="text" id="gamesearch" placeholder="Type here to search.." />
|
||||
<button id="random" onclick="selectRandomGame()">Click to play a random game!</button>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<h2>Pinned Games</h2>
|
||||
<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>
|
||||
|
||||
<div id="games">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
37
js/all.js
37
js/all.js
@ -1,6 +1,5 @@
|
||||
function setCloak() {
|
||||
var tabicon = getCookie("tabicon");
|
||||
|
||||
if (tabicon) {
|
||||
var link = document.querySelector("link[rel~='icon']");
|
||||
if (link) {
|
||||
@ -21,6 +20,7 @@ function setCloak() {
|
||||
if (tabname) {
|
||||
document.title = tabname;
|
||||
}
|
||||
panicMode();
|
||||
}
|
||||
function getCookie(cname) {
|
||||
let name = cname + "=";
|
||||
@ -43,9 +43,6 @@ function panicMode() {
|
||||
if (panicurl == "") {
|
||||
panicurl = "https://google.com";
|
||||
}
|
||||
if ($("#panicmode").length > 0) {
|
||||
$("#panicmode").prop({ href: panicurl });
|
||||
}
|
||||
const pressed = [];
|
||||
const secretCode = "safemode";
|
||||
window.addEventListener("keyup", (e) => {
|
||||
@ -56,13 +53,29 @@ function panicMode() {
|
||||
}
|
||||
});
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
let jquery_loader = document.createElement("script");
|
||||
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 () {
|
||||
|
||||
window.onload = function() {
|
||||
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();
|
||||
});
|
||||
setCloak();
|
||||
});
|
||||
|
||||
|
||||
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);
|
||||
const body = document.querySelector("body");
|
||||
body.style.removeProperty("display");
|
||||
const html = document.querySelector("body");
|
||||
html.style.removeProperty("background-color");
|
||||
const bar = document.querySelector("progress");
|
||||
bar.remove();
|
||||
}
|
||||
if ($("#panicmode").length > 0) {
|
||||
$("#panicmode").prop({ href: panicurl });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user