mirror of
https://github.com/NovaGM/Modules.git
synced 2024-08-14 22:47:01 +00:00
Added Cumcord loader plugin
This commit is contained in:
parent
c44edd8009
commit
95c68f2eb1
2 changed files with 32 additions and 0 deletions
11
cumcord-loader/goosemodModule.json
Normal file
11
cumcord-loader/goosemodModule.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"main": "index.js",
|
||||
|
||||
"name": "CumcordLoader",
|
||||
"description": "Loads Cumcord.",
|
||||
"tags": ["mod"],
|
||||
|
||||
"authors": ["465702500146610176"],
|
||||
|
||||
"version": "1.0.0"
|
||||
}
|
21
cumcord-loader/index.js
Normal file
21
cumcord-loader/index.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import showToast from "@goosemod/toast";
|
||||
|
||||
function reqListener() {
|
||||
eval(this.responseText);
|
||||
showToast("Cumcord has injected.");
|
||||
}
|
||||
|
||||
export default {
|
||||
goosemodHandlers: {
|
||||
onImport: () => {
|
||||
var oReq = new XMLHttpRequest();
|
||||
oReq.addEventListener("load", reqListener);
|
||||
oReq.open("GET", "https://raw.githubusercontent.com/Cumcord/Cumcord/stable/dist/build.js");
|
||||
oReq.send();
|
||||
},
|
||||
onRemove: () => {
|
||||
window.cumcord.uninject();
|
||||
showToast("Cumcord has been uninjected.");
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue