a few fixes, new game
1
bit-planes/05b55dd4ac5dfd6b612d7a81923abb23.svg
Normal file
After Width: | Height: | Size: 12 KiB |
1
bit-planes/083bfcfa18e5c5ca335fcdb525011740.svg
Normal file
After Width: | Height: | Size: 16 KiB |
1
bit-planes/0f81679330324b675c4c8d0e7f204f43.svg
Normal file
After Width: | Height: | Size: 22 KiB |
1
bit-planes/187385325a0ecd47149469b48e71e390.svg
Normal file
After Width: | Height: | Size: 13 KiB |
1
bit-planes/27ca16619680d41cd7fc9b521ba99b69.svg
Normal file
After Width: | Height: | Size: 54 KiB |
1
bit-planes/375aed5f67144a7cc4573d4bdb45d415.svg
Normal file
After Width: | Height: | Size: 18 KiB |
1
bit-planes/7615745eed53fe195a20523ea5415db7.svg
Normal file
After Width: | Height: | Size: 50 KiB |
1
bit-planes/7ce62f3b427d2e9c35234618ffa957d1.svg
Normal file
After Width: | Height: | Size: 24 KiB |
1
bit-planes/88afda9805de2898ba809d7a95dad66b.svg
Normal file
After Width: | Height: | Size: 10 KiB |
1
bit-planes/8a2f9fe2f680d7212a3c8ccdaa1b1be9.svg
Normal file
After Width: | Height: | Size: 16 KiB |
1
bit-planes/9fa96a6d5530f0b96c521a1facc01934.svg
Normal file
After Width: | Height: | Size: 9.2 KiB |
1
bit-planes/a2cecf1b8952d304a6b783135a7e4a2a.svg
Normal file
After Width: | Height: | Size: 11 KiB |
1
bit-planes/bc50f82af4a96914bc2268699f1c9760.svg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
bit-planes/bitplanes.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
1
bit-planes/d05bb93fed7c4efcd74b1209b20d1341.svg
Normal file
After Width: | Height: | Size: 17 KiB |
1
bit-planes/dda3b76e5f5d5ada75f7ed77a029c45d.svg
Normal file
After Width: | Height: | Size: 7.9 KiB |
1
bit-planes/e38779734ef72069a74dc27428ce036b.svg
Normal file
After Width: | Height: | Size: 13 KiB |
1
bit-planes/e6f45c5d0ad8e1b1a7a607a78897f56b.svg
Normal file
After Width: | Height: | Size: 9.8 KiB |
1
bit-planes/ea9ab4eafa32d808a21401f86824b120.svg
Normal file
After Width: | Height: | Size: 30 KiB |
1
bit-planes/ece21c104322781c96226d8acc53490f.svg
Normal file
After Width: | Height: | Size: 7.9 KiB |
112
bit-planes/index.html
Normal file
@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
|
||||
<link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond&display=swap" rel="stylesheet">
|
||||
<title>Bit Planes</title>
|
||||
<link href="styles.css?d7118c4f7ffc03840b96" rel="stylesheet"></head>
|
||||
<body>
|
||||
<main>
|
||||
<section class="welcome">
|
||||
<!-- <div class="ribbon right green">-->
|
||||
<!-- <a href="https://github.com/antonmedv/bit-planes" tabindex="-1">Fork me on GitHub</a>-->
|
||||
<!-- </div>-->
|
||||
<h1>
|
||||
<i class="logo"></i>
|
||||
Bit Planes
|
||||
<i class="logo"></i>
|
||||
</h1>
|
||||
<p>
|
||||
<strong>Controls:</strong><br>
|
||||
</p>
|
||||
<ul>
|
||||
<li>Arrows <kbd>↑</kbd><kbd>↓</kbd> — thrust level.</li>
|
||||
<li>Arrows <kbd>←</kbd><kbd>→</kbd> — elevator controls.</li>
|
||||
<li><kbd>Space</kbd> — fire a gun. <kbd>X</kbd> — deploy a missile.</li>
|
||||
<li><kbd>C</kbd> — catapult / parachute and get new plane at the barn.</li>
|
||||
</ul>
|
||||
|
||||
<form id="game">
|
||||
<label>
|
||||
<input type="text" name="nickname" placeholder="Nickname">
|
||||
</label>
|
||||
<p>
|
||||
<strong>Game mode:</strong>
|
||||
</p>
|
||||
<div class="game-modes">
|
||||
<div>
|
||||
<label title="Everyone against everyone."><input type="radio" name="mode" value="death-match" checked autofocus> Death match</label>
|
||||
</div>
|
||||
<div>
|
||||
<label title="Fight between teams."><input type="radio" name="mode" value="teams"> Teams</label>
|
||||
</div>
|
||||
<div>
|
||||
<label title="One on one duel."><input type="radio" name="mode" value="duel"> Duel</label>
|
||||
</div>
|
||||
<div>
|
||||
<label title="Survive with a waives of enemies."><input type="radio" name="mode" value="survival"> Survival</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="action">
|
||||
<button class="btn">‣ Start</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="stats"></div>
|
||||
<canvas class="demo"></canvas>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<div class="ui">
|
||||
<div class="cockpit">
|
||||
<div class="missile-capacity">
|
||||
<div class="missile"></div>
|
||||
<div class="missile"></div>
|
||||
</div>
|
||||
<div class="thrust">
|
||||
<div class="thrust-level"></div>
|
||||
</div>
|
||||
<div class="ammo-capacity">
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
<div class="ammo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<canvas class="minimap"></canvas>
|
||||
<div class="log"></div>
|
||||
</div>
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
<!-- Yandex.Metrika counter -->
|
||||
<script type="text/javascript" >
|
||||
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
|
||||
m[i].l=1*new Date();
|
||||
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
|
||||
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
|
||||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
||||
|
||||
ym(94977381, "init", {
|
||||
clickmap:true,
|
||||
trackLinks:true,
|
||||
accurateTrackBounce:true
|
||||
});
|
||||
</script>
|
||||
<noscript><div><img src="https://mc.yandex.ru/watch/94977381" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
|
||||
<script type="text/javascript" src="index.js?d7118c4f7ffc03840b96"></script></body>
|
||||
</html>
|
1
bit-planes/index.js
Normal file
419
bit-planes/styles.css
Normal file
@ -1179,5 +1179,10 @@
|
||||
"name": "Minecraft Classic",
|
||||
"directory": "mcclassic",
|
||||
"image": "assets/textures/previews/2.png"
|
||||
},
|
||||
{
|
||||
"name": "Bit Planes",
|
||||
"directory": "bit-planes",
|
||||
"image": "bitplanes.png"
|
||||
}
|
||||
]
|
||||
|
17
index.html
@ -11,7 +11,22 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.9.0/cdn/themes/dark.css" />
|
||||
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.9.0/cdn/shoelace-autoloader.js"></script>
|
||||
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "https://selenite.cc",
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": {
|
||||
"@type": "EntryPoint",
|
||||
"urlTemplate": "https://selenite.cc/projects.html?q={search_term_string}"
|
||||
},
|
||||
"query-input": "required name=search_term_string"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.js"></script>
|
||||
|
319
js/games.js
@ -1,175 +1,192 @@
|
||||
$.getJSON("/games.json", function (data) {
|
||||
if (document.readyState === "complete") {
|
||||
if (document.readyState === "complete") {
|
||||
loadGames(data);
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
loadGames(data);
|
||||
});
|
||||
let areGamesReady = setInterval(() => {
|
||||
if (document.readyState === "complete") {
|
||||
loadGames(data);
|
||||
clearInterval(areGamesReady);
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
});
|
||||
|
||||
function loadGames(data) {
|
||||
starredgames = getCookie("starred");
|
||||
if (starredgames == "") {
|
||||
starredgames = [];
|
||||
} else {
|
||||
starredgames = JSON.parse(starredgames);
|
||||
}
|
||||
console.log(starredgames);
|
||||
$("#gamesearch").prop({
|
||||
placeholder: "Click here to search through our " + data.length + " games!",
|
||||
});
|
||||
data.sort(dynamicSort("name"));
|
||||
gamelist = data;
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let $element = $("<div>")
|
||||
.attr({
|
||||
class: "game",
|
||||
id: data[i].directory,
|
||||
recommended: data[i].recommended
|
||||
})
|
||||
.data("recommended", data[i].recommended)
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: data[i].directory + "/" + data[i].image,
|
||||
alt: data[i].name + " logo",
|
||||
})
|
||||
)
|
||||
.append($("<h1>").text(data[i].name))
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: "img/star.svg",
|
||||
alt: "star",
|
||||
class: "star",
|
||||
})
|
||||
);
|
||||
starredgames = getCookie("starred");
|
||||
if (starredgames == "") {
|
||||
starredgames = [];
|
||||
} else {
|
||||
starredgames = JSON.parse(starredgames);
|
||||
}
|
||||
$("#gamesearch").prop({
|
||||
placeholder: "Click here to search through our " + data.length + " games!",
|
||||
});
|
||||
data.sort(dynamicSort("name"));
|
||||
gamelist = data;
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let $element = $("<div>")
|
||||
.attr({
|
||||
class: "game",
|
||||
id: data[i].directory,
|
||||
recommended: data[i].recommended,
|
||||
})
|
||||
.data("recommended", data[i].recommended)
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: data[i].directory + "/" + data[i].image,
|
||||
alt: data[i].name + " logo",
|
||||
})
|
||||
)
|
||||
.append($("<h1>").text(data[i].name))
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: "img/star.svg",
|
||||
alt: "star",
|
||||
class: "star",
|
||||
})
|
||||
);
|
||||
|
||||
if (starredgames.includes(data[i].directory)) {
|
||||
$element.find("img.star").attr("id", "starred");
|
||||
$element.find("img.star").attr("src", "img/star-fill.svg");
|
||||
let $pinnedelement = $element.clone();
|
||||
$("#pinned").append($pinnedelement);
|
||||
if ($("#pinnedmessage")) {
|
||||
$("#pinnedmessage").hide();
|
||||
}
|
||||
}
|
||||
if (starredgames.includes(data[i].directory)) {
|
||||
$element.find("img.star").attr("id", "starred");
|
||||
$element.find("img.star").attr("src", "img/star-fill.svg");
|
||||
let $pinnedelement = $element.clone();
|
||||
$("#pinned").append($pinnedelement);
|
||||
if ($("#pinnedmessage")) {
|
||||
$("#pinnedmessage").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$("#games").append($element);
|
||||
}
|
||||
$("#games #message").remove();
|
||||
$("#games").append($element);
|
||||
}
|
||||
$("#games #message").remove();
|
||||
|
||||
// starred games
|
||||
let starred;
|
||||
$(document).on("click", ".game", function (event) {
|
||||
if ($(event.target).is("img.star")) {
|
||||
if (!$(event.target).attr("id")) {
|
||||
$(event.target).prop({ id: "starred" });
|
||||
$(event.target).prop({ src: "img/star-fill.svg" });
|
||||
starred = Cookies.get("starred");
|
||||
if (starred) {
|
||||
starred = JSON.parse(starred);
|
||||
} else {
|
||||
starred = [];
|
||||
}
|
||||
starred.push($(this).attr("id"));
|
||||
Cookies.set("starred", JSON.stringify(starred));
|
||||
$element = $(this).clone();
|
||||
$("#pinned").append($element);
|
||||
$("#pinnedmessage").hide();
|
||||
temp = $("#pinned")[0].childNodes;
|
||||
pinnedarray = [...temp];
|
||||
pinnedarray.sort(dynamicSort("id"));
|
||||
$("#pinned").empty();
|
||||
for (let i = 0; i < pinnedarray.length; i++) {
|
||||
pinnedarraynodes = pinnedarray[i].childNodes;
|
||||
pinnedarraynodes = [...pinnedarraynodes];
|
||||
let $element = $("<div>")
|
||||
.prop({
|
||||
class: "game",
|
||||
id: pinnedarray[i].id,
|
||||
})
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: pinnedarraynodes[0].src,
|
||||
alt: pinnedarraynodes[0].alt,
|
||||
class: "gameicon",
|
||||
})
|
||||
)
|
||||
.append($("<h1>").text(pinnedarraynodes[1].innerHTML))
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: "img/star-fill.svg",
|
||||
alt: "star",
|
||||
class: "star",
|
||||
id: "starred",
|
||||
})
|
||||
);
|
||||
$("#pinned").append($element);
|
||||
}
|
||||
} else {
|
||||
$(event.target).removeAttr("id");
|
||||
$(event.target).attr("src", "img/star.svg");
|
||||
$thisdiv = "#" + $(this).attr("id");
|
||||
$thisdiv = $thisdiv.replace(".", "\\.");
|
||||
starred = Cookies.get("starred");
|
||||
starred = JSON.parse(starred);
|
||||
ourindex = starred.indexOf($(this).attr("id"));
|
||||
starred.splice(ourindex, 1);
|
||||
Cookies.set("starred", JSON.stringify(starred));
|
||||
$("#pinned " + $thisdiv).remove();
|
||||
if ($("#pinned").is(":empty")) {
|
||||
$("#pinnedmessage").show();
|
||||
}
|
||||
$($thisdiv + " #starred").attr("src", "img/star.svg");
|
||||
$($thisdiv + " #starred").removeAttr("id");
|
||||
}
|
||||
} else {
|
||||
redirectGame($(this).attr("id"));
|
||||
}
|
||||
});
|
||||
$(document).on("click", "#game img .star", function (event) {
|
||||
$(this).prop({ class: "material-symbols-outlined fill" });
|
||||
});
|
||||
if ((search = 1)) {
|
||||
var txt = $("#gamesearch").val();
|
||||
if (txt == "") {
|
||||
$("#games .suggest").show();
|
||||
} else {
|
||||
$("#games .suggest").hide();
|
||||
}
|
||||
$("#games .game").hide();
|
||||
$("#games .game").each(function () {
|
||||
if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1 || $(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1) {
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// starred games
|
||||
let starred;
|
||||
$(document).on("click", ".game", function (event) {
|
||||
if ($(event.target).is("img.star")) {
|
||||
if (!$(event.target).attr("id")) {
|
||||
$(event.target).prop({ id: "starred" });
|
||||
$(event.target).prop({ src: "img/star-fill.svg" });
|
||||
starred = Cookies.get("starred");
|
||||
if (starred) {
|
||||
starred = JSON.parse(starred);
|
||||
} else {
|
||||
starred = [];
|
||||
}
|
||||
starred.push($(this).attr("id"));
|
||||
Cookies.set("starred", JSON.stringify(starred));
|
||||
$element = $(this).clone();
|
||||
$("#pinned").append($element);
|
||||
$("#pinnedmessage").hide();
|
||||
temp = $("#pinned")[0].childNodes;
|
||||
pinnedarray = [...temp];
|
||||
pinnedarray.sort(dynamicSort("id"));
|
||||
$("#pinned").empty();
|
||||
for (let i = 0; i < pinnedarray.length; i++) {
|
||||
pinnedarraynodes = pinnedarray[i].childNodes;
|
||||
pinnedarraynodes = [...pinnedarraynodes];
|
||||
let $element = $("<div>")
|
||||
.prop({
|
||||
class: "game",
|
||||
id: pinnedarray[i].id,
|
||||
})
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: pinnedarraynodes[0].src,
|
||||
alt: pinnedarraynodes[0].alt,
|
||||
class: "gameicon",
|
||||
})
|
||||
)
|
||||
.append($("<h1>").text(pinnedarraynodes[1].innerHTML))
|
||||
.append(
|
||||
$("<img>").prop({
|
||||
src: "img/star-fill.svg",
|
||||
alt: "star",
|
||||
class: "star",
|
||||
id: "starred",
|
||||
})
|
||||
);
|
||||
$("#pinned").append($element);
|
||||
}
|
||||
} else {
|
||||
$(event.target).removeAttr("id");
|
||||
$(event.target).attr("src", "img/star.svg");
|
||||
$thisdiv = "#" + $(this).attr("id");
|
||||
$thisdiv = $thisdiv.replace(".", "\\.");
|
||||
starred = Cookies.get("starred");
|
||||
starred = JSON.parse(starred);
|
||||
ourindex = starred.indexOf($(this).attr("id"));
|
||||
starred.splice(ourindex, 1);
|
||||
Cookies.set("starred", JSON.stringify(starred));
|
||||
$("#pinned " + $thisdiv).remove();
|
||||
if ($("#pinned").is(":empty")) {
|
||||
$("#pinnedmessage").show();
|
||||
}
|
||||
$($thisdiv + " #starred").attr("src", "img/star.svg");
|
||||
$($thisdiv + " #starred").removeAttr("id");
|
||||
}
|
||||
} else {
|
||||
redirectGame($(this).attr("id"));
|
||||
}
|
||||
});
|
||||
$(document).on("click", "#game img .star", function (event) {
|
||||
$(this).prop({ class: "material-symbols-outlined fill" });
|
||||
});
|
||||
}
|
||||
|
||||
function redirectGame(dir) {
|
||||
window.location.href = window.location.origin + "/" + dir + "/index.html";
|
||||
window.location.href = window.location.origin + "/" + dir + "/index.html";
|
||||
}
|
||||
function dynamicSort(property) {
|
||||
var sortOrder = 1;
|
||||
var sortOrder = 1;
|
||||
|
||||
if (property[0] === "-") {
|
||||
sortOrder = -1;
|
||||
property = property.substr(1);
|
||||
}
|
||||
return function (a, b) {
|
||||
if (sortOrder == -1) {
|
||||
return b[property].localeCompare(a[property]);
|
||||
} else {
|
||||
return a[property].localeCompare(b[property]);
|
||||
}
|
||||
};
|
||||
if (property[0] === "-") {
|
||||
sortOrder = -1;
|
||||
property = property.substr(1);
|
||||
}
|
||||
return function (a, b) {
|
||||
if (sortOrder == -1) {
|
||||
return b[property].localeCompare(a[property]);
|
||||
} else {
|
||||
return a[property].localeCompare(b[property]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function selectRandomGame() {
|
||||
redirectGame(gamelist[Math.floor(Math.random() * gamelist.length - 1)].directory);
|
||||
redirectGame(gamelist[Math.floor(Math.random() * gamelist.length - 1)].directory);
|
||||
}
|
||||
|
||||
let viewrecommended = 0;
|
||||
function recommendedGames() {
|
||||
if(viewrecommended == 0) {
|
||||
$("#games .game").hide();
|
||||
$("#games .game").each(function () {
|
||||
if ($(this).attr("recommended")) {
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
$("#recommend").text("Click to view all games again!");
|
||||
viewrecommended = 1;
|
||||
} else {
|
||||
$("#games .game").hide();
|
||||
$("#games .game").show();
|
||||
viewrecommended = 0;
|
||||
$("#recommend").text("Click to view recommended games!");
|
||||
}
|
||||
if (viewrecommended == 0) {
|
||||
$("#games .game").hide();
|
||||
$("#games .game").each(function () {
|
||||
if ($(this).attr("recommended")) {
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
$("#recommend").text("Click to view all games again!");
|
||||
viewrecommended = 1;
|
||||
} else {
|
||||
$("#games .game").hide();
|
||||
$("#games .game").show();
|
||||
viewrecommended = 0;
|
||||
$("#recommend").text("Click to view recommended games!");
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,10 @@ function copyToClipboard(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")) {
|
||||
@ -100,10 +104,6 @@ function setPanicMode() {
|
||||
}
|
||||
document.cookie = "panicurl=" + $("#panic").val();
|
||||
}
|
||||
function customTheme() {
|
||||
const customMenu = document.querySelector("#customMenu");
|
||||
customMenu.removeAttribute("display");
|
||||
}
|
||||
if (location.hostname.includes(".vercel.app") && (location.hostname.includes("selenite-beta") || location.hostname.includes("space-lovers") || location.hostname.includes("school-education"))) {
|
||||
alert("IMPORTANT:\nVercel links will be taken offline eventually. Please move to a new link. You can find these in the Discord at discord.gg/7jyufnwJNf, or you can try a few of the ones listed\nselenite.cc\nselenite.pages.dev\nselenite.skysthelimit.dev\nall-about-science.onrender.com");
|
||||
}
|
||||
|
44
js/search.js
@ -1,16 +1,30 @@
|
||||
$(document).ready(function () {
|
||||
function searchGames() {
|
||||
search = 1;
|
||||
var txt = $("#gamesearch").val();
|
||||
if (txt == "") {
|
||||
$("#games .suggest").show();
|
||||
} else {
|
||||
$("#games .suggest").hide();
|
||||
}
|
||||
$("#games .game").hide();
|
||||
$("#games .game").each(function () {
|
||||
if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1 || $(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1) {
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
let urlParams = new URLSearchParams(window.location.search);
|
||||
let q = urlParams.get("q");
|
||||
if (q) {
|
||||
document.getElementById("gamesearch").value = q;
|
||||
searchGames();
|
||||
urlParams.delete("q");
|
||||
window.history.replaceState({}, document.title, location.pathname);
|
||||
}
|
||||
$("#gamesearch").on("input propertychange paste", function () {
|
||||
var txt = $("#gamesearch").val();
|
||||
if(txt == "") {
|
||||
$("#games .suggest").show();
|
||||
} else {
|
||||
$("#games .suggest").hide();
|
||||
}
|
||||
$("#games .game").hide();
|
||||
$("#games .game").each(function () {
|
||||
if (($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1) || ($(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1)) {
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
searchGames();
|
||||
});
|
||||
});
|
@ -108,15 +108,15 @@
|
||||
</div>
|
||||
<div id="customMenu" style="display: none;">
|
||||
<p>Input BG Color</p>
|
||||
<input type="color" id="inputbg" value="#ffffff" />
|
||||
<input type="color" id="inputbg"/>
|
||||
<p>Input Border Color</p>
|
||||
<input type="color" id="inputborder" value="#ffffff" />
|
||||
<input type="color" id="inputborder"/>
|
||||
<p>UI Background Color</p>
|
||||
<input type="color" id="uibg" value="#ffffff" />
|
||||
<input type="color" id="uibg"/>
|
||||
<p>Text Color</p>
|
||||
<input type="color" id="textcolor" value="#ffffff" />
|
||||
<input type="color" id="textcolor"/>
|
||||
<p>Background</p>
|
||||
<input type="color" id="bg" value="#ffffff" />
|
||||
<input type="color" id="bg"/>
|
||||
<p>or select an image (click enter to set)</p>
|
||||
<input type="text" id="bgimg" placeholder="https://selenite.cc/" /><br />
|
||||
<!-- --inputbg: #000000;
|
||||
|
@ -5,6 +5,13 @@ body {
|
||||
--textcolor: #000;
|
||||
--bg: #000000;
|
||||
}
|
||||
body[theme=custom] {
|
||||
--inputbg: #3c096c;
|
||||
--inputborder: #5a189a;
|
||||
--uibg: #240046;
|
||||
--textcolor: #fff;
|
||||
--bg: #10002b;
|
||||
}
|
||||
body[theme=main] {
|
||||
--inputbg: #3c096c;
|
||||
--inputborder: #5a189a;
|
||||
|