mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 00:24:11 +01:00
Don't push pass through mode multiple times. Closes issue #641.
This commit is contained in:
@@ -1586,7 +1586,10 @@ var Events = Module("events", {
|
||||
|
||||
mappings.add([modes.MAIN],
|
||||
["<C-z>", "<pass-all-keys>"], "Temporarily ignore all " + config.appName + " key bindings",
|
||||
function () { modes.push(modes.PASS_THROUGH); });
|
||||
function () {
|
||||
if (modes.main != modes.PASS_THROUGH)
|
||||
modes.push(modes.PASS_THROUGH);
|
||||
});
|
||||
|
||||
mappings.add([modes.MAIN, modes.PASS_THROUGH, modes.QUOTE],
|
||||
["<C-v>", "<pass-next-key>"], "Pass through next key",
|
||||
|
||||
@@ -47,7 +47,7 @@ var Group = Class("Group", {
|
||||
|
||||
makeArgs: function makeArgs(doc, context, args) {
|
||||
let res = update({ doc: doc, context: context }, args);
|
||||
return update(this.argsExtra(res), args);
|
||||
return update(res, this.argsExtra(res), args);
|
||||
},
|
||||
|
||||
get toStringParams() [this.name],
|
||||
@@ -194,7 +194,7 @@ var Contexts = Module("contexts", {
|
||||
let contextPath = file.path;
|
||||
let self = Set.has(plugins, contextPath) && plugins.contexts[contextPath];
|
||||
|
||||
if (!self && isPlugin)
|
||||
if (!self && isPlugin && false)
|
||||
self = Set.has(plugins, id) && plugins[id];
|
||||
|
||||
if (self) {
|
||||
|
||||
@@ -798,8 +798,8 @@ var Options = Module("options", {
|
||||
util.makeDTD(
|
||||
iter(([["option", o.name, "default"].join("."),
|
||||
o.type === "string" ? o.defaultValue.replace(/'/g, "''") :
|
||||
o.value === true ? "on" :
|
||||
o.value === false ? "off" : o.stringDefaultValue]
|
||||
o.defaultValue === true ? "on" :
|
||||
o.defaultValue === false ? "off" : o.stringDefaultValue]
|
||||
for (o in self)),
|
||||
|
||||
([["option", o.name, "type"].join("."), o.type] for (o in self)),
|
||||
|
||||
@@ -74,11 +74,11 @@ update(Sheet.prototype, {
|
||||
return preamble + css;
|
||||
|
||||
let selectors = filter.map(function (part)
|
||||
!/^(?:[a-z-]+[:*]|[a-z-.]+$)/i.test(part) ? "regexp(" + (".*(?:" + part + ").*").quote() + ")" :
|
||||
!/^(?:[a-z-]+[:*]|[a-z-.]+$)/i.test(part) ? "regexp(" + Styles.quote(".*(?:" + part + ").*") + ")" :
|
||||
(/[*]$/.test(part) ? "url-prefix" :
|
||||
/[\/:]/.test(part) ? "url"
|
||||
: "domain")
|
||||
+ '("' + part.replace(/"/g, "%22").replace(/\*$/, "") + '")')
|
||||
+ '(' + Styles.quote(part.replace(/\*$/, "")) + ')')
|
||||
.join(",\n ");
|
||||
|
||||
return preamble + "@-moz-document " + selectors + " {\n\n" + css + "\n\n}\n";
|
||||
@@ -530,7 +530,17 @@ var Styles = Module("Styles", {
|
||||
| [^;}\s]+
|
||||
)
|
||||
]]>, "gix", this)
|
||||
})
|
||||
}),
|
||||
|
||||
/**
|
||||
* Quotes a string for use in CSS stylesheets.
|
||||
*
|
||||
* @param {string} str
|
||||
* @returns {string}
|
||||
*/
|
||||
quote: function quote(str) {
|
||||
return '"' + str.replace(/([\\"])/g, "\\$1").replace(/\n/g, "\\00000a") + '"';
|
||||
},
|
||||
}, {
|
||||
commands: function (dactyl, modules, window) {
|
||||
const { commands, contexts, styles } = modules;
|
||||
|
||||
Reference in New Issue
Block a user