1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Implement default preferences

This commit is contained in:
Jonas Jenwald 2013-11-18 23:51:06 +01:00
parent 29ee96cc67
commit 60610cd625
8 changed files with 278 additions and 8 deletions

View file

@ -240,3 +240,16 @@ var Cache = function cacheCache(size) {
};
};
//#if !(FIREFOX || MOZCENTRAL || B2G)
var isLocalStorageEnabled = (function isLocalStorageEnabledClosure() {
// Feature test as per http://diveintohtml5.info/storage.html
// The additional localStorage call is to get around a FF quirk, see
// bug #495747 in bugzilla
try {
return ('localStorage' in window && window['localStorage'] !== null &&
localStorage);
} catch (e) {
return false;
}
})();
//#endif