Update edupage.user.js

This commit is contained in:
Bruno Rybársky 2023-10-25 21:38:10 +02:00
parent c80e503c78
commit 0a7e13a00c

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name Edupage H4x // @name Edupage H4x
// @namespace https://brn.systems // @namespace https://brn.systems
// @version 0.2.15 // @version 0.2.16
// @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
@ -43,6 +43,12 @@
default: false, default: false,
title: 'Fakes you as an adult student(you might be able to sign your own grades)' title: 'Fakes you as an adult student(you might be able to sign your own grades)'
}, },
modify_agent: {
label: 'Fake mobile app',
type: 'checkbox',
default: false,
title: 'Fakes you as an adult student(you might be able to sign your own grades)'
},
modify_admin_stuff: { modify_admin_stuff: {
label: 'Fake admin', label: 'Fake admin',
type: 'checkbox', type: 'checkbox',
@ -92,6 +98,7 @@
let fake_logged_in = gmc.get("modify_logged_in"); let fake_logged_in = gmc.get("modify_logged_in");
let disable_encoding = gmc.get("modify_encoding"); let disable_encoding = gmc.get("modify_encoding");
let change_strings = gmc.get("modify_strings"); let change_strings = gmc.get("modify_strings");
let modify_agent = gmc.get("modify_agent");
let strings = { let strings = {
3276: "budeme Ťa otravovať za", 3276: "budeme Ťa otravovať za",
@ -204,21 +211,17 @@
console.error('EdubarUtils not found or not a function.'); 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(disable_encoding){
if (typeof unsafeWindow.barEncLink === 'function') { if (typeof unsafeWindow.barEncLink === 'function') {
unsafeWindow.barEncLink = modifiedbarEncLink; unsafeWindow.barEncLink = modifiedbarEncLink;
unsafeWindow.AscMobileAppVersion = "69420";
console.log("barEncLink overriden successfully."); console.log("barEncLink overriden successfully.");
} }
else { else {
console.error('barEncLink not found or not a function.'); console.error('barEncLink not found or not a function.');
} }
} }
if(change_strings){ if(change_strings){
if (typeof unsafeWindow.Langs === 'object') { if (typeof unsafeWindow.Langs === 'object') {
for (var key in strings) { for (var key in strings) {