From c80e503c7883050c0089b7362699b056ce8432c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 24 Oct 2023 19:28:01 +0200 Subject: [PATCH] d --- edupage.user.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/edupage.user.js b/edupage.user.js index 8e357e4..70ce8df 100644 --- a/edupage.user.js +++ b/edupage.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Edupage H4x // @namespace https://brn.systems -// @version 0.2.14 +// @version 0.2.15 // @copyright Can be found at https://git.brn.systems/BRNSystems/Userscripts // @description Gives you a bit more options on EduPage, some are broken // @author BRNSystems @@ -204,9 +204,15 @@ console.error('EdubarUtils not found or not a function.'); } + let _oldStartDrawing =StartDrawing; + function StartDrawing() { + _oldStartDrawing();//if you need previous function + //extend code here; + } + if(disable_encoding){ - if (typeof window.barEncLink === 'function') { - window.barEncLink = modifiedbarEncLink; + if (typeof unsafeWindow.barEncLink === 'function') { + unsafeWindow.barEncLink = modifiedbarEncLink; console.log("barEncLink overriden successfully."); } else { @@ -214,15 +220,15 @@ } } if(change_strings){ - if (typeof window.Langs === 'object') { + if (typeof unsafeWindow.Langs === 'object') { for (var key in strings) { var value = strings[key]; - window.Langs[key] = value; + unsafeWindow.Langs[key] = value; } console.log("Strings overriden successfully."); } else { - console.error('window.Langs not found or not a function.'); + console.error('Langs not found or not a function.'); } } }