diff --git a/app/main/tray.js b/app/main/tray.js index bc4106e3..21a0567f 100644 --- a/app/main/tray.js +++ b/app/main/tray.js @@ -12,13 +12,13 @@ let tray = null; let aboutWindow; let domainWindow; +const iconPath = path.join(__dirname, '../resources', 'Icon.png'); + exports.create = win => { if (process.platform === 'darwin' || tray) { return; } - const iconPath = path.join(__dirname, '../resources', 'Icon.png'); - const toggleWin = () => { if (win.isVisible()) { win.hide(); diff --git a/app/renderer/js/main.js b/app/renderer/js/main.js index 59fda423..dd6d643c 100644 --- a/app/renderer/js/main.js +++ b/app/renderer/js/main.js @@ -9,9 +9,9 @@ window.location.href = 'https://' + data["domain"]; } else { dialogs.prompt('Enter the URL for your Zulip server', function(url) { - url = url.replace(/^https?:\/\//,'') - db.push("/domain", url); - window.location.href = 'https://' + url ; + newurl = url.replace(/^https?:\/\//,'') + db.push("/domain", newurl); + window.location.href = 'https://' + newurl ; }) }