From 8d96f9cae41510877291fef696a01af721d7aeb8 Mon Sep 17 00:00:00 2001 From: Flex Date: Sat, 9 Dec 2017 12:25:48 -0700 Subject: [PATCH] more canary/ptb fixes --- channels/@me/cynergy.js | 3 ++- channels/@me/index.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/channels/@me/cynergy.js b/channels/@me/cynergy.js index c84ea65..94ad2ff 100644 --- a/channels/@me/cynergy.js +++ b/channels/@me/cynergy.js @@ -28,7 +28,8 @@ var cacheclear = function () { } var cleanup = function () { - _win.loadURL('https://discordapp.com/channels/@me'); + let dir = approot().split('app.asar')[0].replace(/\\/g,"/"); + _win.loadURL(`https://${(dir.toLowerCase().indexOf("discordcanary") > -1 && "canary.") || (dir.toLowerCase().indexOf("discordptb") > -1 && "ptb.") || ""}discordapp.com/channels/@me`); } var setup = function () { diff --git a/channels/@me/index.html b/channels/@me/index.html index f830605..1bf3155 100644 --- a/channels/@me/index.html +++ b/channels/@me/index.html @@ -43,12 +43,12 @@ if(confirm("This is your last chance to back out. It's all over from here if you continue.","Final Chance To Leave")){ setup(); }else{ - require("electron").remote.getCurrentWindow().loadURL("https://discordapp.com/channels/@me"); + cleanup(); } } var goback = function(){ - require("electron").remote.getCurrentWindow().loadURL("https://discordapp.com/channels/@me"); + cleanup(); } if(typeof(_cynergy_ver) !== "undefined"){