repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 5ebffaf1c486df25e9a1a9c3c7a250d71c61941b:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 5ebffaf1c486df25e9a1a9c3c7a250d71c61941b
Author: James Baicoianu 
Date:   Fri Apr 22 14:25:23 2022 -0700

    Graceful fallback for localStorage permissions problems

diff --git a/scripts/janusweb.js b/scripts/janusweb.js
index 875dd504e48355a222319f87cb3843753b345076..
index ..1519efc418b58d1a028996205120330675557294 100644
--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -74,7 +74,11 @@ elation.require([
       });
       elation.events.add(window, 'popstate', elation.bind(this, this.handlePopstate));

-      this.bookmarks = elation.collection.localindexed({index: 'url', storagekey: 'janusweb.bookmarks'});
+      try {
+        this.bookmarks = elation.collection.localindexed({index: 'url', storagekey: 'janusweb.bookmarks'});
+      } catch (e) {
+        this.bookmarks = elation.collection.indexed({index: 'url', storagekey: 'janusweb.bookmarks'});
+      }

       if (this.corsproxy != '') {
         elation.engine.assets.setCORSProxy(this.corsproxy);

-----END OF PAGE-----