mobile support, idek

This commit is contained in:
sky
2025-08-17 19:13:08 -04:00
parent b6c7d612a4
commit f99c78c0a8
26 changed files with 146 additions and 12000 deletions

28
js/search.js.old Executable file
View File

@ -0,0 +1,28 @@
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);
}
document.getElementById("gamesearch").addEventListener("input", () => {
searchGames();
});
});