1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge branch 'master' of https://github.com/mozilla/pdf.js into sidebar-pinning

This commit is contained in:
gigaherz 2012-02-09 17:34:26 +01:00
commit 24b72f70bf
13 changed files with 277 additions and 46 deletions

View file

@ -109,7 +109,7 @@ var Settings = (function SettingsClosure() {
var database = null;
var index;
if (isFirefoxExtension)
database = FirefoxCom.request('getDatabase', null);
database = FirefoxCom.request('getDatabase', null) || '{}';
else if (isLocalStorageEnabled)
database = localStorage.getItem('database') || '{}';
else
@ -131,8 +131,6 @@ var Settings = (function SettingsClosure() {
index = database.files.push({fingerprint: fingerprint}) - 1;
this.file = database.files[index];
this.database = database;
if (isLocalStorageEnabled)
localStorage.setItem('database', JSON.stringify(database));
}
Settings.prototype = {