mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 14:27:59 +01:00
Fix user :commands and other minor cleanup.
--HG-- extra : rebase_source : 1cff53f18c70b12a984d120e73d121dc2267dcc9
This commit is contained in:
@@ -322,7 +322,7 @@ var Command = Class("Command", {
|
||||
if (callable(params))
|
||||
function makeParams(self, args)
|
||||
array.toObject([[k, process(v)]
|
||||
for ([k, v] in iter(params.apply(this, args)))])
|
||||
for ([k, v] in iter(params.apply(self, args)))])
|
||||
else if (params)
|
||||
function makeParams(self, args)
|
||||
array.toObject([[name, process(args[i])]
|
||||
|
||||
@@ -351,8 +351,7 @@ var ConfigBase = Class("ConfigBase", {
|
||||
Bell background-color: black !important;
|
||||
|
||||
Hint;;*;FontFixed {
|
||||
font-size: 10px !important;
|
||||
font-weight: bold !important;
|
||||
font-weight: bold !important;
|
||||
background-color: red;
|
||||
color: white;
|
||||
padding: 0px 1px;
|
||||
|
||||
@@ -25,12 +25,15 @@ services.subscriptLoader.loadSubScript("chrome://browser/content/sanitize.js", t
|
||||
tmp.Sanitizer.prototype.__proto__ = Class.prototype;
|
||||
|
||||
var Range = Struct("min", "max");
|
||||
Range.prototype.contains = function (date)
|
||||
date == null || (this.min == null || date >= this.min) && (this.max == null || date <= this.max);
|
||||
Range.prototype.__defineGetter__("isEternity", function () this.max == null && this.min == null);
|
||||
Range.prototype.__defineGetter__("isSession", function () this.max == null && this.min == sanitizer.sessionStart);
|
||||
Range.prototype.__defineGetter__("native", function ()
|
||||
this.isEternity ? null : [range.min || 0, range.max == null ? Number.MAX_VALUE : range.max]);
|
||||
update(Range.prototype, {
|
||||
contains: function (date) date == null ||
|
||||
(this.min == null || date >= this.min) && (this.max == null || date <= this.max),
|
||||
|
||||
get isEternity() this.max == null && this.min == null,
|
||||
get isSession() this.max == null && this.min == sanitizer.sessionStart,
|
||||
|
||||
get native() this.isEternity ? null : [range.min || 0, range.max == null ? Number.MAX_VALUE : range.max]
|
||||
});
|
||||
|
||||
var Item = Class("Item", {
|
||||
init: function (name) {
|
||||
|
||||
@@ -359,7 +359,7 @@ var Styles = Module("Styles", {
|
||||
]]>, "gi",
|
||||
{
|
||||
space: /(?: \s | \/\* .*? \*\/ )/,
|
||||
string: /(?:"(?:[^\\"]|\\.)*(?:"|$)|'(?:[^\\']|\\.)*(?:'|$))/
|
||||
string: /(?:" (?:[^\\"]|\\.)* (?:"|$) | '(?:[^\\']|\\.)* (?:'|$) )/
|
||||
})
|
||||
}, {
|
||||
commands: function (dactyl, modules, window) {
|
||||
|
||||
@@ -96,7 +96,7 @@ var Template = Module("Template", {
|
||||
let tag = (/^'.*'$/.test(topic) ? "o" :
|
||||
/^:\w/.test(topic) ? "ex" : "k");
|
||||
topic = topic.replace(/^'(.*)'$/, "$1");
|
||||
return <{tag} xmlns={NS}>{topic}</{tag}>
|
||||
return <{tag} xmlns={NS}>{topic}</{tag}>
|
||||
},
|
||||
|
||||
// if "processStrings" is true, any passed strings will be surrounded by " and
|
||||
|
||||
Reference in New Issue
Block a user