1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-28 10:32:27 +01:00
This commit is contained in:
Kris Maglione
2015-12-20 19:10:52 -08:00
parent 916ea412a5
commit 174f4ec636
4 changed files with 15 additions and 13 deletions

View File

@@ -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;
}),

View File

@@ -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);

View File

@@ -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+ \[)?
([^]*)
)?