diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-12-31 12:40:44 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-12-31 12:40:44 -0500 |
commit | c6f5b04cdaba6a7723f00e7e903ef2abf4c96ef4 (patch) | |
tree | 75533cbfc43595390285cc31a1abf91fd0f0fffa | |
parent | 4eb8682f28a8ccc85656ece4c12bd5d5a8b62b89 (diff) | |
download | pentadactyl-c6f5b04cdaba6a7723f00e7e903ef2abf4c96ef4.tar.gz |
Fix user :commands and other minor cleanup.
--HG--
extra : rebase_source : 1cff53f18c70b12a984d120e73d121dc2267dcc9
-rw-r--r-- | common/content/commands.js | 2 | ||||
-rw-r--r-- | common/modules/config.jsm | 3 | ||||
-rw-r--r-- | common/modules/sanitizer.jsm | 15 | ||||
-rw-r--r-- | common/modules/styles.jsm | 2 | ||||
-rw-r--r-- | common/modules/template.jsm | 2 |
5 files changed, 13 insertions, 11 deletions
diff --git a/common/content/commands.js b/common/content/commands.js index b860fbaa..b1ec03e9 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -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])] diff --git a/common/modules/config.jsm b/common/modules/config.jsm index d2cbdff4..0b9508ee 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -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; diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm index 9320c354..f2b1e4ff 100644 --- a/common/modules/sanitizer.jsm +++ b/common/modules/sanitizer.jsm @@ -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) { diff --git a/common/modules/styles.jsm b/common/modules/styles.jsm index 49fd7a58..2676fc22 100644 --- a/common/modules/styles.jsm +++ b/common/modules/styles.jsm @@ -359,7 +359,7 @@ var Styles = Module("Styles", { ]]>, "gi", { space: /(?: \s | \/\* .*? \*\/ )/, - string: /(?:"(?:[^\\"]|\\.)*(?:"|$)|'(?:[^\\']|\\.)*(?:'|$))/ + string: /(?:" (?:[^\\"]|\\.)* (?:"|$) | '(?:[^\\']|\\.)* (?:'|$) )/ }) }, { commands: function (dactyl, modules, window) { diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 7e4454eb..c13158e3 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -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 |