-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMorePuddingInit.js
53 lines (44 loc) · 2 KB
/
MorePuddingInit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
window.MorePudding = {};
////////////////////////////////////////////////////////////////////
//RUNCODEBEFORE
////////////////////////////////////////////////////////////////////
window.MorePudding.runCodeBefore = function() {
/*
function loadAndRunCodeSynchronous(url) {
let req = new XMLHttpRequest();
req.open('GET', url, false);
req.onload = function() {
if(this.status === 200) {
(1,eval)(this.responseText);
} else {
console.log(`Loading selected mod returned non-200 status. Received: ${this.status}`);
}
};
req.onerror = function(event) {
console.error(`Error when attempting to retrieve mod code from ${url}`);
console.log(event);
};
req.send();
}
*/
//loadAndRunCodeSynchronous('https://raw.githubusercontent.com/DarkSnakeGang/GoogleSnakePudding/main/PuddingMod.js');
//loadAndRunCodeSynchronous('https://raw.githubusercontent.com/DarkSnakeGang/GoogleSnakeCustomMenuStuff/main/modloadercode.js');
console.log("Enabling Pudding Mod");
window.PuddingMod.runCodeBefore();
window.VisibilityModCode.runCodeBefore();
window.moreMenu.runCodeBefore();
}
////////////////////////////////////////////////////////////////////
//ALTERSNAKECODE
////////////////////////////////////////////////////////////////////
window.MorePudding.alterSnakeCode = function(code) {
return window.moreMenu.alterSnakeCode(window.VisibilityModCode.alterSnakeCode(window.PuddingMod.alterSnakeCode(code)));
}
window.MorePudding.runCodeAfter = function() {
//window.moreMenu.runCodeAfter();
let modIndicator = document.createElement('div');
modIndicator.style='position:absolute;font-family:roboto;color:white;font-size:14px;padding-top:4px;padding-left:30px;user-select: none;';
modIndicator.textContent = 'More Pudding Mod';
let canvasNode = document.getElementsByClassName('jNB0Ic')[0];
document.getElementsByClassName('EjCLSb')[0].insertBefore(modIndicator, canvasNode);
};