1414 * See the License for the specific language governing permissions and
1515 * limitations under the License.
1616 */
17- /* globals PDFJS, VIEW_HISTORY_MEMORY, isLocalStorageEnabled, Promise */
17+ /* globals PDFJS, VIEW_HISTORY_MEMORY, Promise */
1818
1919'use strict' ;
2020
2424 *
2525 * The way that the view parameters are stored depends on how PDF.js is built,
2626 * for 'node make <flag>' the following cases exist:
27- * - FIREFOX or MOZCENTRAL - uses about:config .
27+ * - FIREFOX or MOZCENTRAL - uses sessionStorage .
2828 * - B2G - uses asyncStorage.
2929 * - GENERIC or CHROME - uses localStorage, if it is available.
3030 */
@@ -48,13 +48,11 @@ var ViewHistory = (function ViewHistoryClosure() {
4848//#endif
4949
5050//#if FIREFOX || MOZCENTRAL
51- // resolvePromise(FirefoxCom.requestSync('getDatabase', null ));
51+ // resolvePromise(sessionStorage.getItem('pdfjsHistory' ));
5252//#endif
5353
5454//#if !(FIREFOX || MOZCENTRAL || B2G)
55- if (isLocalStorageEnabled ) {
56- resolvePromise (localStorage .getItem ('database' ));
57- }
55+ resolvePromise (localStorage .getItem ('database' ));
5856//#endif
5957 }
6058
@@ -95,13 +93,11 @@ var ViewHistory = (function ViewHistoryClosure() {
9593//#endif
9694
9795//#if FIREFOX || MOZCENTRAL
98- // FirefoxCom.requestSync('setDatabase', database);
96+ // sessionStorage.setItem('pdfjsHistory', database);
9997//#endif
10098
10199//#if !(FIREFOX || MOZCENTRAL || B2G)
102- if (isLocalStorageEnabled ) {
103- localStorage .setItem ('database' , database );
104- }
100+ localStorage .setItem ('database' , database );
105101//#endif
106102 },
107103
0 commit comments