1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 21:28:00 +01:00

Fix user :commands and other minor cleanup.

--HG--
extra : rebase_source : 1cff53f18c70b12a984d120e73d121dc2267dcc9
This commit is contained in:
Kris Maglione
2010-12-31 12:40:44 -05:00
parent 4eb8682f28
commit c6f5b04cda
5 changed files with 13 additions and 11 deletions

View File

@@ -322,7 +322,7 @@ var Command = Class("Command", {
if (callable(params)) if (callable(params))
function makeParams(self, args) function makeParams(self, args)
array.toObject([[k, process(v)] 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) else if (params)
function makeParams(self, args) function makeParams(self, args)
array.toObject([[name, process(args[i])] array.toObject([[name, process(args[i])]

View File

@@ -351,8 +351,7 @@ var ConfigBase = Class("ConfigBase", {
Bell background-color: black !important; Bell background-color: black !important;
Hint;;*;FontFixed { Hint;;*;FontFixed {
font-size: 10px !important; font-weight: bold !important;
font-weight: bold !important;
background-color: red; background-color: red;
color: white; color: white;
padding: 0px 1px; padding: 0px 1px;

View File

@@ -25,12 +25,15 @@ services.subscriptLoader.loadSubScript("chrome://browser/content/sanitize.js", t
tmp.Sanitizer.prototype.__proto__ = Class.prototype; tmp.Sanitizer.prototype.__proto__ = Class.prototype;
var Range = Struct("min", "max"); var Range = Struct("min", "max");
Range.prototype.contains = function (date) update(Range.prototype, {
date == null || (this.min == null || date >= this.min) && (this.max == null || date <= this.max); contains: function (date) date == null ||
Range.prototype.__defineGetter__("isEternity", function () this.max == null && this.min == null); (this.min == null || date >= this.min) && (this.max == null || date <= this.max),
Range.prototype.__defineGetter__("isSession", function () this.max == null && this.min == sanitizer.sessionStart);
Range.prototype.__defineGetter__("native", function () get isEternity() this.max == null && this.min == null,
this.isEternity ? null : [range.min || 0, range.max == null ? Number.MAX_VALUE : range.max]); 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", { var Item = Class("Item", {
init: function (name) { init: function (name) {

View File

@@ -359,7 +359,7 @@ var Styles = Module("Styles", {
]]>, "gi", ]]>, "gi",
{ {
space: /(?: \s | \/\* .*? \*\/ )/, space: /(?: \s | \/\* .*? \*\/ )/,
string: /(?:"(?:[^\\"]|\\.)*(?:"|$)|'(?:[^\\']|\\.)*(?:'|$))/ string: /(?:" (?:[^\\"]|\\.)* (?:"|$) | '(?:[^\\']|\\.)* (?:'|$) )/
}) })
}, { }, {
commands: function (dactyl, modules, window) { commands: function (dactyl, modules, window) {

View File

@@ -96,7 +96,7 @@ var Template = Module("Template", {
let tag = (/^'.*'$/.test(topic) ? "o" : let tag = (/^'.*'$/.test(topic) ? "o" :
/^:\w/.test(topic) ? "ex" : "k"); /^:\w/.test(topic) ? "ex" : "k");
topic = topic.replace(/^'(.*)'$/, "$1"); 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 // if "processStrings" is true, any passed strings will be surrounded by " and