Update edupage.user.js

This commit is contained in:
Bruno Rybársky 2023-10-24 18:54:49 +02:00
parent ba1e8ee66b
commit e1a1790977

@ -1,7 +1,7 @@
// ==UserScript==
// @name Edupage H4x
// @namespace https://brn.systems
// @version 0.2.7
// @version 0.2.8
// @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';
GM_config.init({
gmc = GM_config.init({
id: 'edupage_h4x_cnf',
title: GM_info.script.name + ' Settings',
fields: {
@ -76,7 +76,7 @@
})
GM_registerMenuCommand('Settings', () => {
GM_config.open()
gmc.open()
})
let strings = {
@ -108,7 +108,7 @@
return url;
}
if(GM_config.get("modify_startbutton")){
if(gmc.get("modify_startbutton")){
//removes intro button
waitForKeyElements ("a.learnMoreBtn", deleteNotX);
}
@ -116,7 +116,7 @@
// Find and replace the original function
if (typeof EdubarUtils !== 'undefined') {
if(GM_config.get("modify_admin_stuff")){
if(gmc.get("modify_admin_stuff")){
if(typeof EdubarUtils.getLoggedUserType === 'function'){
EdubarUtils.getLoggedUserType = modifiedGetLoggedUserType;
console.log('EdubarUtils.getLoggedUserType overridden successfully.');
@ -151,7 +151,7 @@
}
}
if(GM_config.get("modify_adult_student")){
if(gmc.get("modify_adult_student")){
if (typeof EdubarUtils.isAdultStudent === 'function') {
EdubarUtils.isAdultStudent = justtrue;
console.log('EdubarUtils.isAdultStudent overridden successfully.');
@ -167,7 +167,7 @@
}
}
if(GM_config.get("modify_restricted")){
if(gmc.get("modify_restricted")){
if (typeof EdubarUtils.isRestrictedEdupage === 'function') {
EdubarUtils.isRestrictedEdupage = justfalse;
console.log('EdubarUtils.isRestrictedEdupage overridden successfully.');
@ -176,7 +176,7 @@
}
}
if(GM_config.get("modify_logged_in")){
if(gmc.get("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(GM_config.get("modify_encoding")){
if(gmc.get("modify_encoding")){
if (typeof window.barEncLink === 'function') {
window.barEncLink = modifiedbarEncLink;
console.log("barEncLink overriden successfully.");
@ -200,7 +200,7 @@
}
}
if(GM_config.get("modify_strings")){
if(gmc.get("modify_strings")){
if (typeof window.Langs === 'object') {
for (var key in strings) {
var value = strings[key];