mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-04 12:15:45 +01:00
Merge default.
--HG-- branch : groups
This commit is contained in:
4
common/bootstrap.js
vendored
4
common/bootstrap.js
vendored
@@ -175,11 +175,11 @@ function init() {
|
||||
reportError(e);
|
||||
}
|
||||
|
||||
if (JSMLoader && JSMLoader.bump != 3) // Temporary hack
|
||||
if (JSMLoader && JSMLoader.bump !== 4) // Temporary hack
|
||||
Services.scriptloader.loadSubScript("resource://dactyl" + suffix + "/bootstrap.jsm",
|
||||
Cu.import("resource://dactyl/bootstrap.jsm", global));
|
||||
|
||||
if (!JSMLoader || JSMLoader.bump != 3)
|
||||
if (!JSMLoader || JSMLoader.bump !== 4)
|
||||
Cu.import("resource://dactyl/bootstrap.jsm", global);
|
||||
|
||||
JSMLoader.load("resource://dactyl/bootstrap.jsm", global);
|
||||
|
||||
@@ -1594,13 +1594,21 @@ var Buffer = Module("buffer", {
|
||||
});
|
||||
|
||||
context.pushProcessor(0, function (item, text, next) <>
|
||||
<span highlight="Indicator" style="display: inline-block;">{item.item.indicator}</span>
|
||||
<span highlight="Indicator" style="display: inline-block;">{item.indicator}</span>
|
||||
{ next.call(this, item, text) }
|
||||
</>);
|
||||
context.process[1] = function (item, text) template.bookmarkDescription(item, template.highlightFilter(text, this.filter));
|
||||
|
||||
context.anchored = false;
|
||||
context.keys = { text: "text", description: "url", icon: "icon", id: "id", command: function () "tabs.select" };
|
||||
context.keys = {
|
||||
text: "text",
|
||||
description: "url",
|
||||
indicator: function (item) item.tab === tabs.getTab() ? "%" :
|
||||
item.tab === tabs.alternate ? "#" : " ",
|
||||
icon: "icon",
|
||||
id: "id",
|
||||
command: function () "tabs.select"
|
||||
};
|
||||
context.compare = CompletionContext.Sort.number;
|
||||
context.filters = [CompletionContext.Filter.textDescription];
|
||||
|
||||
@@ -1621,9 +1629,9 @@ var Buffer = Module("buffer", {
|
||||
|
||||
return {
|
||||
text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url],
|
||||
tab: tab,
|
||||
id: i - 1,
|
||||
url: url,
|
||||
indicator: indicator,
|
||||
icon: tab.image || DEFAULT_FAVICON
|
||||
};
|
||||
});
|
||||
|
||||
@@ -456,8 +456,8 @@ var Tabs = Module("tabs", {
|
||||
if (buffer == "#")
|
||||
return tabs.selectAlternateTab();
|
||||
|
||||
count = Math.max(1, count || 1);
|
||||
reverse = Boolean(reverse);
|
||||
count = Math.max(1, count || 1) * (1 + -2 * reverse);
|
||||
|
||||
let matches = buffer.match(/^(\d+):?/);
|
||||
if (matches)
|
||||
@@ -467,17 +467,21 @@ var Tabs = Module("tabs", {
|
||||
if (matches)
|
||||
return tabs.select(matches, false);
|
||||
|
||||
matches = completion.runCompleter("buffer", buffer);
|
||||
matches = completion.runCompleter("buffer", buffer).map(function (obj) obj.tab);
|
||||
|
||||
if (matches.length == 0)
|
||||
dactyl.echoerr("E94: No matching buffer for " + buffer);
|
||||
else if (matches.length > 1 && !allowNonUnique)
|
||||
dactyl.echoerr("E93: More than one match for " + buffer);
|
||||
else {
|
||||
let index = (count - 1) % matches.length;
|
||||
if (reverse)
|
||||
index = matches.length - index - 1;
|
||||
tabs.select(matches[index].id, false);
|
||||
let start = matches.indexOf(tabs.getTab());
|
||||
if (start == -1 && reverse)
|
||||
start++;
|
||||
|
||||
let index = (start + count) % matches.length;
|
||||
if (index < 0)
|
||||
index = matches.length + index;
|
||||
tabs.select(matches[index], false);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -676,7 +676,8 @@ function Class() {
|
||||
return res !== undefined ? res : self;
|
||||
})]]>,
|
||||
"constructor", (name || superclass.className).replace(/\W/g, "_"))
|
||||
.replace("PARAMS", /^function .*?\((.*?)\)/.exec(args[0] && args[0].init || Class.prototype.init)[1]));
|
||||
.replace("PARAMS", /^function .*?\((.*?)\)/.exec(args[0] && args[0].init || Class.prototype.init)[1]
|
||||
.replace(/\b(self|res|Constructor)\b/g, "$1_")));
|
||||
|
||||
Constructor.className = name || superclass.className || superclass.name;
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ var storage = Components.classes["@mozilla.org/fuel/application;1"]
|
||||
|
||||
var JSMLoader = storage.get("dactyl.JSMLoader", undefined);
|
||||
|
||||
if (!JSMLoader || JSMLoader.bump != 3)
|
||||
if (!JSMLoader || JSMLoader.bump != 4)
|
||||
JSMLoader = {
|
||||
bump: 3,
|
||||
bump: 4,
|
||||
builtin: Components.utils.Sandbox(this),
|
||||
canonical: {},
|
||||
factories: [],
|
||||
@@ -33,7 +33,7 @@ if (!JSMLoader || JSMLoader.bump != 3)
|
||||
|
||||
this.storage.set("dactyl.JSMLoader", this);
|
||||
|
||||
let base = JSMLoader.load("base.jsm", global);
|
||||
let base = this.load("base.jsm", global);
|
||||
global.EXPORTED_SYMBOLS = base.EXPORTED_SYMBOLS;
|
||||
global.JSMLoader = this;
|
||||
base.JSMLoader = this;
|
||||
|
||||
@@ -754,6 +754,6 @@ config.INIT = update(Object.create(config.INIT), config.INIT, {
|
||||
|
||||
endModule();
|
||||
|
||||
} catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
|
||||
} catch(e){ if (typeof e === "string") e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
|
||||
|
||||
// vim: set fdm=marker sw=4 sts=4 et ft=javascript:
|
||||
|
||||
@@ -497,10 +497,13 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
|
||||
case "list":
|
||||
modules.commandline.commandOutput(template.tabular(
|
||||
["Host", "Session", "Path", "Value"], ["padding-right: 1em", "padding-right: 1em", "padding-right: 1em"],
|
||||
["Host", "Expiry (UTC)", "Path", "Name", "Value"],
|
||||
["padding-right: 1em", "padding-right: 1em", "padding-right: 1em", "max-width: 12em; overflow: hidden;", "padding-left: 1ex;"],
|
||||
([c.host,
|
||||
<span highlight={c.isSession ? "Enabled" : "Disabled"}>{c.isSession ? "session" : "persistent"}</span>,
|
||||
c.isSession ? <span highlight="Enabled">session</span>
|
||||
: (new Date(c.expiry * 1000).toJSON() || "Never").replace(/:\d\d\.000Z/, "").replace("T", " ").replace(/-/g, "/"),
|
||||
c.path,
|
||||
c.name,
|
||||
c.value]
|
||||
for (c in Sanitizer.iterCookies(host)))));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user