From e50da97f7857605bc21c9b1ca457cbf276114c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 24 Oct 2023 18:58:35 +0200 Subject: [PATCH] Update edupage.user.js --- edupage.user.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/edupage.user.js b/edupage.user.js index 3ca93cd..b520494 100644 --- a/edupage.user.js +++ b/edupage.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Edupage H4x // @namespace https://brn.systems -// @version 0.2.8 +// @version 0.2.9 // @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 @@ -26,7 +26,7 @@ (function() { 'use strict'; - gmc = GM_config.init({ + GM_config.init({ id: 'edupage_h4x_cnf', title: GM_info.script.name + ' Settings', fields: { @@ -108,7 +108,7 @@ return url; } - if(gmc.get("modify_startbutton")){ + if(GM_config.getValue("modify_startbutton")){ //removes intro button waitForKeyElements ("a.learnMoreBtn", deleteNotX); } @@ -116,7 +116,7 @@ // Find and replace the original function if (typeof EdubarUtils !== 'undefined') { - if(gmc.get("modify_admin_stuff")){ + if(GM_config.getValue("modify_admin_stuff")){ if(typeof EdubarUtils.getLoggedUserType === 'function'){ EdubarUtils.getLoggedUserType = modifiedGetLoggedUserType; console.log('EdubarUtils.getLoggedUserType overridden successfully.'); @@ -151,7 +151,7 @@ } } - if(gmc.get("modify_adult_student")){ + if(GM_config.getValue("modify_adult_student")){ if (typeof EdubarUtils.isAdultStudent === 'function') { EdubarUtils.isAdultStudent = justtrue; console.log('EdubarUtils.isAdultStudent overridden successfully.'); @@ -167,7 +167,7 @@ } } - if(gmc.get("modify_restricted")){ + if(GM_config.getValue("modify_restricted")){ if (typeof EdubarUtils.isRestrictedEdupage === 'function') { EdubarUtils.isRestrictedEdupage = justfalse; console.log('EdubarUtils.isRestrictedEdupage overridden successfully.'); @@ -176,7 +176,7 @@ } } - if(gmc.get("modify_logged_in")){ + if(GM_config.getValue("modify_logged_in")){ if (typeof EdubarUtils.isLoggedToPortal === 'function') { EdubarUtils.isLoggedToPortal = justtrue; console.log('EdubarUtils.isLoggedToPortal overridden successfully.'); @@ -190,7 +190,7 @@ console.error('EdubarUtils not found or not a function.'); } - if(gmc.get("modify_encoding")){ + if(GM_config.getValue("modify_encoding")){ if (typeof window.barEncLink === 'function') { window.barEncLink = modifiedbarEncLink; console.log("barEncLink overriden successfully."); @@ -200,7 +200,7 @@ } } - if(gmc.get("modify_strings")){ + if(GM_config.getValue("modify_strings")){ if (typeof window.Langs === 'object') { for (var key in strings) { var value = strings[key];