From 3058c404321d101f9a364150f2dca79deb5ce9d0 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 10 Feb 2013 23:06:47 +0100 Subject: [PATCH] Update web/viewer.js Use asyncStorage.setItem for B2G --- web/viewer.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/web/viewer.js b/web/viewer.js index c47200e86..f10ef1e96 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -218,11 +218,18 @@ var Settings = (function SettingsClosure() { var file = this.file; file[name] = val; 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) localStorage.setItem('database', database); -//#else -// FirefoxCom.requestSync('setDatabase', database); //#endif },