You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
802 B

export default {
timeout: undefined,
noWebpack() {
if (!window.webpackChunkdiscord_app) {
return true
} else if (window.webpackChunkdiscord_app?.length < 56) {
return true
}
return false
},
async start() {
console.log("Starting attempts to load Demoncord...")
const text = await (await fetch("https://cors.ruthenic.com/https://git.ruthenic.com/Demon/demoncord-builds/raw/branch/master/build.js", {cache: "no-store"})).text()
this.timeout = setInterval(() => this.inject(text), 1e3)
},
inject(code) {
if (this.noWebpack()) {
return
}
eval(code)
demon.summon("utils/logger").log(["Kernel"], "Started Demoncord!")
clearInterval(this.timeout)
},
stop() {
demon.summon("utils/logger").log(["Kernel"], "Uninjecting is overrated!")
},
};