mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 13:47:59 +01:00
Fix loading storage files.
This commit is contained in:
@@ -1116,9 +1116,9 @@ const Hints = Module("hints", {
|
|||||||
options.add(["extendedhinttags", "eht"],
|
options.add(["extendedhinttags", "eht"],
|
||||||
"XPath string of hintable elements activated by ';'",
|
"XPath string of hintable elements activated by ';'",
|
||||||
"regexpmap", "[iI]:" + xpath(["img"]) +
|
"regexpmap", "[iI]:" + xpath(["img"]) +
|
||||||
",[OTivVWy]:" + xpath(["{a,area}[@href]", "{img,iframe}[@src]"]) +
|
",[OTivVWy]:" + xpath(["{a,area}[@href]", "{img,iframe}[@src]"]) +
|
||||||
",[F]:" + xpath(["div", "span", "p", "body", "html"]) +
|
",[F]:" + xpath(["div", "span", "p", "body", "html"]) +
|
||||||
",[S]:" + xpath(["input[not(@type='hidden')]", "textarea", "button", "select"]),
|
",[S]:" + xpath(["input[not(@type='hidden')]", "textarea", "button", "select"]),
|
||||||
{ validator: Option.validateXPath });
|
{ validator: Option.validateXPath });
|
||||||
|
|
||||||
options.add(["hinttags", "ht"],
|
options.add(["hinttags", "ht"],
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const win32 = /^win(32|nt)$/i.test(services.runtime.OS);
|
|||||||
function loadData(name, store, type) {
|
function loadData(name, store, type) {
|
||||||
try {
|
try {
|
||||||
if (storage.infoPath)
|
if (storage.infoPath)
|
||||||
var file = storage.infoPath.child(name);
|
var file = storage.infoPath.child(name).read();
|
||||||
if (file)
|
if (file)
|
||||||
var result = services.json.decode(file);
|
var result = services.json.decode(file);
|
||||||
if (result instanceof type)
|
if (result instanceof type)
|
||||||
|
|||||||
Reference in New Issue
Block a user