mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 16:32:27 +01:00
Only force reload stylesheets if asked. Fix :sty completion for about:blank
This commit is contained in:
@@ -135,13 +135,15 @@ liberator.Buffer = function () //{{{
|
|||||||
return matches.length;
|
return matches.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.registerSheet = function (uri, doCheckSyntax)
|
this.registerSheet = function (uri, doCheckSyntax, reload)
|
||||||
{
|
{
|
||||||
if (doCheckSyntax)
|
if (doCheckSyntax)
|
||||||
checkSyntax(uri);
|
checkSyntax(uri);
|
||||||
this.unregisterSheet(uri);
|
if (reload)
|
||||||
|
this.unregisterSheet(uri);
|
||||||
uri = ios.newURI(uri, null, null);
|
uri = ios.newURI(uri, null, null);
|
||||||
sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
|
if (reload || !sss.sheetRegistered(uri, sss.USER_SHEET))
|
||||||
|
sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.unregisterSheet = function (uri)
|
this.unregisterSheet = function (uri)
|
||||||
@@ -775,11 +777,17 @@ liberator.Buffer = function () //{{{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
completer: function (filter) [0, liberator.completion.filter(
|
completer: function (filter) {
|
||||||
[[content.location.host, ""],
|
let compl = [];
|
||||||
[content.location.href, ""]]
|
try
|
||||||
.concat([[s, ""] for each (s in styles.sites)])
|
{
|
||||||
, filter)],
|
compl.push([content.location.host, "Current Host"]);
|
||||||
|
compl.push([content.location.href, "Current URL"]);
|
||||||
|
}
|
||||||
|
catch (e) {}
|
||||||
|
comp = compl.concat([[s, ""] for each (s in styles.sites)])
|
||||||
|
return [0, liberator.completion.filter(compl, filter)];
|
||||||
|
},
|
||||||
hereDoc: true,
|
hereDoc: true,
|
||||||
bang: true,
|
bang: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -778,8 +778,7 @@ lookup:
|
|||||||
}
|
}
|
||||||
else if (/\.css$/.test(filename))
|
else if (/\.css$/.test(filename))
|
||||||
{
|
{
|
||||||
liberator.storage.styles.unregisterSheet("file://" + file.path);
|
liberator.storage.styles.registerSheet("file://" + file.path, !silent, true);
|
||||||
liberator.storage.styles.registerSheet("file://" + file.path, !silent);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user