mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Update web/viewer.js
Use asyncStorage.setItem for B2G
This commit is contained in:
parent
4317bc2586
commit
3058c40432
1 changed files with 10 additions and 3 deletions
|
@ -218,11 +218,18 @@ var Settings = (function SettingsClosure() {
|
||||||
var file = this.file;
|
var file = this.file;
|
||||||
file[name] = val;
|
file[name] = val;
|
||||||
var database = JSON.stringify(this.database);
|
var database = JSON.stringify(this.database);
|
||||||
//#if !(FIREFOX || MOZCENTRAL)
|
|
||||||
|
//#if B2G
|
||||||
|
// asyncStorage.setItem('database', database);
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
//#if FIREFOX || MOZCENTRAL
|
||||||
|
// FirefoxCom.requestSync('setDatabase', database);
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
//#if !(FIREFOX || MOZCENTRAL || B2G)
|
||||||
if (isLocalStorageEnabled)
|
if (isLocalStorageEnabled)
|
||||||
localStorage.setItem('database', database);
|
localStorage.setItem('database', database);
|
||||||
//#else
|
|
||||||
// FirefoxCom.requestSync('setDatabase', database);
|
|
||||||
//#endif
|
//#endif
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue