dont inject into pages that arent the discord webapp

This commit is contained in:
Astra 2018-04-23 05:55:23 -04:00
parent 4d7f3fe837
commit d31301bb50
2 changed files with 4 additions and 2 deletions

View File

@ -81,8 +81,7 @@
// disable that obnoxious warning about not pasting shit in the console
$api.util.findFuncExports('consoleWarning').consoleWarning = e => { };
// goodies for people directly associated with the endpwn project, and also kat bc shes my girlfriend
// may be expanded to anyone through a web ui later on
// apply custom discrims/bot tags from EndPwn Customizer (endpwn.cathoderay.tube)
$api.util.wrapAfter(
"wc.findCache('getUser')[0].exports.getUser",

View File

@ -17,6 +17,9 @@
(() => {
// abort if we're not currently in the discord app
if (location.hostname.indexOf('discordapp') != -1) return;
// use the discord native api to require electron and get electron.remote
var electron = DiscordNative.nativeModules.requireModule('discord_/../electron').remote;
var fs = electron.require('original-fs');