fixed proxy and settings and adjusted css for smaller screen sizes
This commit is contained in:
+16
-2
@@ -10,9 +10,11 @@ $(".column button .card").on("click", function () {
|
||||
}
|
||||
$("#everything-else").fadeOut(300, () => {
|
||||
$("#page-loader").fadeIn(200);
|
||||
$("#page-loader").attr("src", "/proxy");
|
||||
$("#page-loader iframe").attr("src", config["proxyPath"] || "/proxy");
|
||||
$("#page-loader iframe")[0].focus();
|
||||
});
|
||||
currentMenu = $("#page-loader");
|
||||
inGame = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,6 +26,7 @@ $(".column button .card").on("click", function () {
|
||||
|
||||
$("logo img").on("click", returnHome);
|
||||
$("#gameButton").on("click", returnHome);
|
||||
$("#refresh").on("click", refreshPage);
|
||||
|
||||
$("dialog").on("click", function (e) {
|
||||
if (!e.originalEvent.target.closest("div")) {
|
||||
@@ -293,8 +296,12 @@ function dragElement(elmnt) {
|
||||
function returnHome() {
|
||||
currentMenu.fadeOut(300, () => {
|
||||
$("#everything-else").fadeIn(200);
|
||||
$(".games").hide();
|
||||
$(".homepage").fadeIn(200);
|
||||
});
|
||||
currentMenu = $(".homepage");
|
||||
inGame = false;
|
||||
console.log("e");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -303,5 +310,12 @@ function returnHome() {
|
||||
* @return {void}
|
||||
*/
|
||||
function refreshPage() {
|
||||
location.reload();
|
||||
const oldUrl = $("#page-loader iframe").attr("src");
|
||||
console.log(oldUrl);
|
||||
$("#page-loader iframe").attr("src", "");
|
||||
|
||||
// delay is needed for some reason
|
||||
setTimeout(() => {
|
||||
$("#page-loader iframe").attr("src", oldUrl);
|
||||
}, 10);
|
||||
}
|
||||
+5
-3
@@ -25,7 +25,7 @@ fetch("./config.jsonc").then((e) => e.text()).then((jsonc) => {
|
||||
|
||||
let gamesList = $("#gamesList");
|
||||
for (game in games) {
|
||||
gamesList.append(`<li url="games/${json[game["path"]]}" ${game["aliases"] ? "aliases=\"" + game["aliases"].join(',') + "\"" : ''}>${game}</li>`);
|
||||
gamesList.append(`<li url="games/${games[game]["path"]}" ${games[game]["aliases"] ? "aliases=\"" + games[game]["aliases"].join(',') + "\"" : ''}>${game}</li>`);
|
||||
}
|
||||
|
||||
$("#gamesList li").on("click", function() {
|
||||
@@ -33,8 +33,9 @@ fetch("./config.jsonc").then((e) => e.text()).then((jsonc) => {
|
||||
inGame = true;
|
||||
$("#everything-else").fadeOut();
|
||||
$("#page-loader").fadeIn();
|
||||
$("#page-loader iframe")[0].src = url;
|
||||
$("#page-loader iframe").attr("src", url);
|
||||
$("#page-loader iframe")[0].focus();
|
||||
currentMenu = $("#page-loader");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -91,9 +92,10 @@ jQuery.fn.extend({showModal: function() {
|
||||
fpsMeter.style.right = "1%";
|
||||
fpsMeter.style.zIndex = "50";
|
||||
fpsMeter.style.background = "rgba(0, 0, 0, 0.5)";
|
||||
fpsMeter.style.opacity = "0.5";
|
||||
fpsMeter.style.padding = "10px";
|
||||
fpsMeter.style.color = "rgba(255, 255, 255, 0.75)";
|
||||
fpsMeter.style.fontFamily = "'Flexi IBM VGA True (437', monospace";
|
||||
fpsMeter.style.fontSize = "24px";
|
||||
fpsMeter.style.zIndex = "10000";
|
||||
})();
|
||||
})();
|
||||
Reference in New Issue
Block a user