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

1 year ago
import metro from "./api/metro";
import patcher from "./api/patcher"
2 years ago
window.demon = {
modules: {
common: {
1 year ago
logger: metro.findByProps("setLogFn"),
moment: metro.findByProps("isMoment")
2 years ago
},
metro
1 year ago
},
patcher
};
2 years ago
try {
1 year ago
//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);
}