more canary/ptb fixes

This commit is contained in:
Cynthia Foxwell 2017-12-09 12:25:48 -07:00
parent 026c392b70
commit 8d96f9cae4
2 changed files with 4 additions and 3 deletions

View File

@ -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 () {

View File

@ -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"){