From 54d133a5301cb5b1808ff4278e8f1384424bbc35 Mon Sep 17 00:00:00 2001 From: Mikael Karlsson Date: Mon, 7 Jan 2019 20:25:59 +0100 Subject: [PATCH] Save "Keep me signed in" setting --- browser.js | 5 ++++- config.js | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/browser.js b/browser.js index 421042762..38501b9b5 100644 --- a/browser.js +++ b/browser.js @@ -465,7 +465,10 @@ window.addEventListener('load', () => { if (location.pathname.startsWith('/login')) { const keepMeSignedInCheckbox = document.querySelector('#u_0_0'); - keepMeSignedInCheckbox.checked = true; + keepMeSignedInCheckbox.checked = config.get('keepMeSignedIn'); + keepMeSignedInCheckbox.addEventListener('click', () => { + config.set('keepMeSignedIn', !config.get('keepMeSignedIn')); + }); } }); diff --git a/config.js b/config.js index cb420d6e3..94b12ff83 100644 --- a/config.js +++ b/config.js @@ -26,6 +26,7 @@ module.exports = new Store({ autoHideMenuBar: false, notificationsMuted: false, hardwareAcceleration: true, - quitOnWindowClose: false + quitOnWindowClose: false, + keepMeSignedIn: true } });