stop crashing on heaven_online pages with no loader

This commit is contained in:
Holly Stubbs 2024-10-13 17:43:56 +01:00
parent f04444bb1b
commit 5ecb6e7a5c
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E

View file

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name MultiProbe // @name MultiProbe
// @namespace https://*.angusnicneven.com/* // @namespace https://*.angusnicneven.com/*
// @version 20241013.1 // @version 20241013.2
// @description Probe with friends! // @description Probe with friends!
// @author tgpholly // @author tgpholly
// @match https://*.angusnicneven.com/* // @match https://*.angusnicneven.com/*
@ -64,7 +64,7 @@ console.log("[MP] MultiProbe init");
'use strict'; 'use strict';
// Make sure to change the userscript version too!!!!!!!!!! // Make sure to change the userscript version too!!!!!!!!!!
const USERSCRIPT_VERSION_RAW = "20241013.1"; const USERSCRIPT_VERSION_RAW = "20241013.2";
const USERSCRIPT_VERSION = parseInt(USERSCRIPT_VERSION_RAW.replace(".", "")); const USERSCRIPT_VERSION = parseInt(USERSCRIPT_VERSION_RAW.replace(".", ""));
if (!continueRunningScript) { if (!continueRunningScript) {
@ -450,7 +450,7 @@ mp_button {
} }
// Cursed way of detecting heavenonline load // Cursed way of detecting heavenonline load
if (window.location.href.split("://")[1].split("/")[0] === "heavenonline.xyz") { if (window.location.href.split("://")[1].split("/")[0] === "heavenonline.xyz" && typeof(finished) !== "undefined") {
pageLoadCompleted = false; pageLoadCompleted = false;
const oldConsoleLog = console.log; const oldConsoleLog = console.log;
console.log = function(...args) { console.log = function(...args) {