From 9a4a6e9b40cdc49d8d9dde885beca093d7810565 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 12 Jun 2017 10:17:52 +0200 Subject: [PATCH 1/2] Always display the upgrade button in the drive --- www/drive/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/drive/main.js b/www/drive/main.js index b6cdfd2c9..ee241ffed 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -2726,7 +2726,7 @@ define([ if (err) { return void logError(err); } $leftside.html(''); $leftside.append($limitContainer); - }); + }, true); /* add a history button */ var histConfig = { From c779e328e8ce73e24ef94339e88e64d09a0f86b0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 13 Jun 2017 11:33:25 +0200 Subject: [PATCH 2/2] warn users if their browser does not support localStorage --- www/common/boot2.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/www/common/boot2.js b/www/common/boot2.js index 76ce9bcf9..64d4bd71d 100644 --- a/www/common/boot2.js +++ b/www/common/boot2.js @@ -20,5 +20,16 @@ define([], function () { }; } + if (!localStorage || typeof(localStorage.getItem) !== 'function') { + require('jquery', function ($) { + $.ajax({ + type: 'HEAD', + url: '/common/feedback.html?NO_LOCALSTORAGE=' + (+new Date()), + }); + }); + window.alert("CryptPad needs localStorage to work, try a different browser"); + return; + } + require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]); });