Update edupage.user.js

This commit is contained in:
Bruno Rybársky 2023-10-24 18:58:35 +02:00
parent e1a1790977
commit e50da97f78

@ -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];