mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 10:32:27 +01:00
Ugh.
This commit is contained in:
@@ -97,7 +97,7 @@ var BookmarkCache = Module("BookmarkCache", XPCOM(Ci.nsINavBookmarkObserver), {
|
||||
let res = {};
|
||||
for (let bookmark of this)
|
||||
if (bookmark.keyword)
|
||||
res[bookmark.keyword] = res;
|
||||
res[bookmark.keyword] = bookmark;
|
||||
|
||||
return res;
|
||||
}),
|
||||
|
||||
@@ -95,7 +95,7 @@ var Help = Module("Help", {
|
||||
update(services["dactyl:"].providers, {
|
||||
"help": Loop((uri, path) => help.files[path]),
|
||||
"help-overlay": Loop((uri, path) => help.overlays[path]),
|
||||
"help-tag": Loop(function (uri, path) {
|
||||
"help-tag": Loop((uri, path) => {
|
||||
let tag = decodeURIComponent(path);
|
||||
if (tag in help.files)
|
||||
return RedirectChannel("dactyl://help/" + tag, uri);
|
||||
|
||||
@@ -153,7 +153,8 @@ ProtocolBase.prototype = {
|
||||
function LocaleChannel(pkg, locale, path, orig) {
|
||||
for (let locale of [locale, "en-US"])
|
||||
for (let sep of "-/") {
|
||||
var channel = Channel(["resource:/", pkg + sep + locale, path].join("/"), orig, true, true);
|
||||
var channel = Channel(["resource:/", pkg + sep + locale, path].join("/"),
|
||||
orig, true, true);
|
||||
if (channel)
|
||||
return channel;
|
||||
}
|
||||
@@ -163,6 +164,7 @@ function LocaleChannel(pkg, locale, path, orig) {
|
||||
|
||||
function StringChannel(data, contentType, uri) {
|
||||
let channel = services.StreamChannel(uri);
|
||||
|
||||
channel.contentStream = services.CharsetConv("UTF-8").convertToInputStream(data);
|
||||
if (contentType)
|
||||
channel.contentType = contentType;
|
||||
@@ -201,7 +203,7 @@ function XMLChannel(uri, contentType, noErrorChannel, unprivileged) {
|
||||
let [, pre, doctype, url, extra, open, post] = util.regexp(String.raw`
|
||||
^ ([^]*?)
|
||||
(?:
|
||||
(<!DOCTYPE \s+ \S+ \s+) (?:SYSTEM \s+ "([^"]*)" | ((?:[^[>\s]|\s[^[])*))
|
||||
(<!DOCTYPE \s+ \S+ \s+) (?:SYSTEM \s+ "([^\"]*)" | ((?:[^[>\s]|\s[^[])*))
|
||||
(\s+ \[)?
|
||||
([^]*)
|
||||
)?
|
||||
|
||||
Reference in New Issue
Block a user