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!
+
All Games
Please wait for the games to load.. If you see this for more than a second, try reloading and reporting a bug report.
+
diff --git a/js/all.js b/js/all.js
index e666e97e..2b569df7 100644
--- a/js/all.js
+++ b/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 () {
- panicMode();
- });
+
+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();
});
+
+
+function defer(method) {
+ if (window.jQuery) {
+ console.log("jquery found.");
+ panicMode();
+ } else {
+ setTimeout(function() { defer(method) }, 50);
+ console.log("jquery not found, adding jquery.");
+ }
+}
diff --git a/js/main.js b/js/main.js
index c96f63dd..78527497 100644
--- a/js/main.js
+++ b/js/main.js
@@ -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 });
}
}