From e877ad2e63630224d6f50c1f96e5bf757feaf12b Mon Sep 17 00:00:00 2001 From: turt2live Date: Fri, 21 Apr 2017 16:08:49 -0600 Subject: [PATCH 1/2] Remember acceptance for unsupported browsers. Addresses #3624. This stores the flag in localStorage, after checking if localStorage is available. If localStorage is not available, the user will be prompted just like before this commit. Signed-off-by: Travis Ralston --- src/vector/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vector/index.js b/src/vector/index.js index 42a60e455..043df5b47 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -263,6 +263,11 @@ async function loadApp() { configError = e; } + if (window.localStorage && window.localStorage.getItem('accepts_unsupported_browser')) { + console.log('User has previously accepted risks in using an unsupported browser'); + validBrowser = true; + } + console.log("Vector starting at "+window.location); if (configError) { window.matrixChat = ReactDOM.render(
@@ -294,6 +299,7 @@ async function loadApp() { var CompatibilityPage = sdk.getComponent("structures.CompatibilityPage"); window.matrixChat = ReactDOM.render( Date: Sat, 22 Apr 2017 02:17:22 +0100 Subject: [PATCH 2/2] prefix localstorage key as per the convention --- src/vector/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 043df5b47..0d704d995 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -263,7 +263,7 @@ async function loadApp() { configError = e; } - if (window.localStorage && window.localStorage.getItem('accepts_unsupported_browser')) { + if (window.localStorage && window.localStorage.getItem('mx_accepts_unsupported_browser')) { console.log('User has previously accepted risks in using an unsupported browser'); validBrowser = true; } @@ -299,7 +299,7 @@ async function loadApp() { var CompatibilityPage = sdk.getComponent("structures.CompatibilityPage"); window.matrixChat = ReactDOM.render(