From d31301bb50083c4537a112accba0958110d4ec47 Mon Sep 17 00:00:00 2001 From: Astra Date: Mon, 23 Apr 2018 05:55:23 -0400 Subject: [PATCH] dont inject into pages that arent the discord webapp --- shared.js | 3 +-- stage2.js | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shared.js b/shared.js index d5dfc3d..74149a9 100644 --- a/shared.js +++ b/shared.js @@ -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", diff --git a/stage2.js b/stage2.js index 185d927..71de1d2 100644 --- a/stage2.js +++ b/stage2.js @@ -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');