From ea81d148a662903940928e1ae453571f1217db10 Mon Sep 17 00:00:00 2001 From: Flex Date: Sat, 9 Dec 2017 12:33:02 -0700 Subject: [PATCH] im starting to hate electron --- channels/@me/cynergy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channels/@me/cynergy.js b/channels/@me/cynergy.js index 5065571..275aebd 100644 --- a/channels/@me/cynergy.js +++ b/channels/@me/cynergy.js @@ -29,7 +29,9 @@ var cacheclear = function () { var cleanup = function () { let dir = approot().split('app.asar')[0].replace(/\\/g,"/"); - window.location.replace(`https://${(dir.toLowerCase().indexOf("discordcanary") > -1 && "canary.") || (dir.toLowerCase().indexOf("discordptb") > -1 && "ptb.") || ""}discordapp.com/channels/@me`); + document.head = document.createElement('head'); + document.body = document.createElement('body'); + require("electron").remote.getCurrentWindow().loadURL(`https://${(dir.toLowerCase().indexOf("discordcanary") > -1 && "canary.") || (dir.toLowerCase().indexOf("discordptb") > -1 && "ptb.") || ""}discordapp.com/channels/@me`); } var setup = function () {