Signed-off-by: Bill Erickson <berick@esilibrary.com>
// localStorage is not directly accessible within oils://
// http://fartersoft.com/blog/2011/03/07/using-localstorage-in-firefox-extensions-for-persistent-data-storage/
openils.XUL.localStorage = function() {
+
+ // in browser mode, use the standard localStorage interface
+ if (!openils.XUL.isXUL())
+ return window.localStorage;
+
var url = location.protocol + '//' + location.hostname;
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);