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.

32 lines
880 B

import metro from "./api/metro";
import patcher from "./api/patcher"
window.demon = {
modules: {
common: {
logger: metro.findByProps("setLogFn"),
moment: metro.findByProps("isMoment")
},
metro
},
patcher
};
try {
//alert(JSON.stringify(demon.modules.common.moment))
//fixme; this should either be removed (and aliu's method of blacklisting moment be used) or actually respect the user's locale
demon.modules.common.moment.locale("en")
//log = new demon.modules.common.Logger();
//JSON.stringify(demon.modules.common.logger)
//log.name = "Demoncord";
// patcher.after("log", log, function() {alert(JSON.stringify(arguments))})
//log.log("Hi from the bundle :)");
//alert(JSON.stringify(metro.findAllByProps("sendMessage")))
patcher.after("sendMessage", metro.findByProps("sendMessage").exports, (args)=>alert(args))
} catch (e) {
alert(e.stack);
}