mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:27:59 +01:00
Fix storage bins.
This commit is contained in:
@@ -1083,7 +1083,7 @@ function QuickMarks() //{{{
|
|||||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
var qmarks = storage.newMap("quickmarks", true);
|
var qmarks = storage.newMap("quickmarks", { store: true });
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// MAPPINGS ////////////////////////////////////////////////
|
////////////////////// MAPPINGS ////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -1581,8 +1581,8 @@ function Marks() //{{{
|
|||||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
var localMarks = storage.newMap("local-marks", true, { privateData: true });
|
var localMarks = storage.newMap("local-marks", { store: true, privateData: true });
|
||||||
var urlMarks = storage.newMap("url-marks", true, { privateData: true });
|
var urlMarks = storage.newMap("url-marks", { store: true, privateData: true });
|
||||||
|
|
||||||
var pendingJumps = [];
|
var pendingJumps = [];
|
||||||
var appContent = document.getElementById("appcontent");
|
var appContent = document.getElementById("appcontent");
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ function Events() //{{{
|
|||||||
|
|
||||||
var lastFocus = null;
|
var lastFocus = null;
|
||||||
|
|
||||||
var macros = storage.newMap("macros", true, { privateData: true });
|
var macros = storage.newMap("macros", { store: true, privateData: true });
|
||||||
|
|
||||||
var currentMacro = "";
|
var currentMacro = "";
|
||||||
var lastMacro = "";
|
var lastMacro = "";
|
||||||
|
|||||||
@@ -1783,7 +1783,7 @@ const liberator = (function () //{{{
|
|||||||
}
|
}
|
||||||
if (liberator.storeErrors)
|
if (liberator.storeErrors)
|
||||||
{
|
{
|
||||||
let errors = storage.newArray("errors", false);
|
let errors = storage.newArray("errors", { store: false });
|
||||||
errors.toString = function () [String(v[0]) + "\n" + v[1] for ([k, v] in this)].join("\n\n");
|
errors.toString = function () [String(v[0]) + "\n" + v[1] for ([k, v] in this)].join("\n\n");
|
||||||
errors.push([new Date, obj + obj.stack]);
|
errors.push([new Date, obj + obj.stack]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ function Options() //{{{
|
|||||||
opt.set(opt.value, options.OPTION_SCOPE_GLOBAL);
|
opt.set(opt.value, options.OPTION_SCOPE_GLOBAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
storage.newMap("options", false);
|
storage.newMap("options", { store: false });
|
||||||
storage.addObserver("options", optionObserver, window);
|
storage.addObserver("options", optionObserver, window);
|
||||||
|
|
||||||
function storePreference(name, value)
|
function storePreference(name, value)
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ function CommandLine() //{{{
|
|||||||
|
|
||||||
const callbacks = {};
|
const callbacks = {};
|
||||||
|
|
||||||
storage.newArray("history-search", true, { privateData: true });
|
storage.newArray("history-search", { store: true, privateData: true });
|
||||||
storage.newArray("history-command", true, { privateData: true });
|
storage.newArray("history-command", { store: true, privateData: true });
|
||||||
|
|
||||||
// Really inideal.
|
// Really inideal.
|
||||||
let services = modules.services; // Storage objects are global to all windows, 'modules' isn't.
|
let services = modules.services; // Storage objects are global to all windows, 'modules' isn't.
|
||||||
|
|||||||
@@ -320,14 +320,14 @@ var storage = {
|
|||||||
return keys[key];
|
return keys[key];
|
||||||
},
|
},
|
||||||
|
|
||||||
newMap: function newMap(key, store, options)
|
newMap: function newMap(key, options)
|
||||||
{
|
{
|
||||||
return this.newObject(key, ObjectStore, store, options);
|
return this.newObject(key, ObjectStore, options);
|
||||||
},
|
},
|
||||||
|
|
||||||
newArray: function newArray(key, store, options)
|
newArray: function newArray(key, options)
|
||||||
{
|
{
|
||||||
return this.newObject(key, ArrayStore, store, { type: Array, __proto__: options });
|
return this.newObject(key, ArrayStore, { type: Array, __proto__: options });
|
||||||
},
|
},
|
||||||
|
|
||||||
addObserver: function addObserver(key, callback, ref)
|
addObserver: function addObserver(key, callback, ref)
|
||||||
|
|||||||
Reference in New Issue
Block a user