Update edupage.user.js
This commit is contained in:
parent
ba1e8ee66b
commit
e1a1790977
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Edupage H4x
|
// @name Edupage H4x
|
||||||
// @namespace https://brn.systems
|
// @namespace https://brn.systems
|
||||||
// @version 0.2.7
|
// @version 0.2.8
|
||||||
// @copyright Can be found at https://git.brn.systems/BRNSystems/Userscripts
|
// @copyright Can be found at https://git.brn.systems/BRNSystems/Userscripts
|
||||||
// @description Gives you a bit more options on EduPage, some are broken
|
// @description Gives you a bit more options on EduPage, some are broken
|
||||||
// @author BRNSystems
|
// @author BRNSystems
|
||||||
@ -26,7 +26,7 @@
|
|||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
GM_config.init({
|
gmc = GM_config.init({
|
||||||
id: 'edupage_h4x_cnf',
|
id: 'edupage_h4x_cnf',
|
||||||
title: GM_info.script.name + ' Settings',
|
title: GM_info.script.name + ' Settings',
|
||||||
fields: {
|
fields: {
|
||||||
@ -76,7 +76,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
GM_registerMenuCommand('Settings', () => {
|
GM_registerMenuCommand('Settings', () => {
|
||||||
GM_config.open()
|
gmc.open()
|
||||||
})
|
})
|
||||||
|
|
||||||
let strings = {
|
let strings = {
|
||||||
@ -108,7 +108,7 @@
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GM_config.get("modify_startbutton")){
|
if(gmc.get("modify_startbutton")){
|
||||||
//removes intro button
|
//removes intro button
|
||||||
waitForKeyElements ("a.learnMoreBtn", deleteNotX);
|
waitForKeyElements ("a.learnMoreBtn", deleteNotX);
|
||||||
}
|
}
|
||||||
@ -116,7 +116,7 @@
|
|||||||
// Find and replace the original function
|
// Find and replace the original function
|
||||||
if (typeof EdubarUtils !== 'undefined') {
|
if (typeof EdubarUtils !== 'undefined') {
|
||||||
|
|
||||||
if(GM_config.get("modify_admin_stuff")){
|
if(gmc.get("modify_admin_stuff")){
|
||||||
if(typeof EdubarUtils.getLoggedUserType === 'function'){
|
if(typeof EdubarUtils.getLoggedUserType === 'function'){
|
||||||
EdubarUtils.getLoggedUserType = modifiedGetLoggedUserType;
|
EdubarUtils.getLoggedUserType = modifiedGetLoggedUserType;
|
||||||
console.log('EdubarUtils.getLoggedUserType overridden successfully.');
|
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') {
|
if (typeof EdubarUtils.isAdultStudent === 'function') {
|
||||||
EdubarUtils.isAdultStudent = justtrue;
|
EdubarUtils.isAdultStudent = justtrue;
|
||||||
console.log('EdubarUtils.isAdultStudent overridden successfully.');
|
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') {
|
if (typeof EdubarUtils.isRestrictedEdupage === 'function') {
|
||||||
EdubarUtils.isRestrictedEdupage = justfalse;
|
EdubarUtils.isRestrictedEdupage = justfalse;
|
||||||
console.log('EdubarUtils.isRestrictedEdupage overridden successfully.');
|
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') {
|
if (typeof EdubarUtils.isLoggedToPortal === 'function') {
|
||||||
EdubarUtils.isLoggedToPortal = justtrue;
|
EdubarUtils.isLoggedToPortal = justtrue;
|
||||||
console.log('EdubarUtils.isLoggedToPortal overridden successfully.');
|
console.log('EdubarUtils.isLoggedToPortal overridden successfully.');
|
||||||
@ -190,7 +190,7 @@
|
|||||||
console.error('EdubarUtils not found or not a function.');
|
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') {
|
if (typeof window.barEncLink === 'function') {
|
||||||
window.barEncLink = modifiedbarEncLink;
|
window.barEncLink = modifiedbarEncLink;
|
||||||
console.log("barEncLink overriden successfully.");
|
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') {
|
if (typeof window.Langs === 'object') {
|
||||||
for (var key in strings) {
|
for (var key in strings) {
|
||||||
var value = strings[key];
|
var value = strings[key];
|
||||||
|
Loading…
Reference in New Issue
Block a user