summaryrefslogtreecommitdiff
path: root/common/modules/config.jsm
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-01-16 22:56:39 -0500
committerKris Maglione <maglione.k@gmail.com>2011-01-16 22:56:39 -0500
commit9e5edb71f220aa875a34dda19272c92facae21b8 (patch)
treee9ffe04ea3149c3d7e9499146e3bf49e42a66e3d /common/modules/config.jsm
parented696fe5c420fecbf050dd87f34d0dafc8d917e8 (diff)
downloadpentadactyl-9e5edb71f220aa875a34dda19272c92facae21b8.tar.gz
Clean some DTD-specific strings out of the top-level config namespace.
Diffstat (limited to 'common/modules/config.jsm')
-rw-r--r--common/modules/config.jsm43
1 files changed, 19 insertions, 24 deletions
diff --git a/common/modules/config.jsm b/common/modules/config.jsm
index 0c86d3d9..98ff6ab5 100644
--- a/common/modules/config.jsm
+++ b/common/modules/config.jsm
@@ -41,9 +41,11 @@ var ConfigBase = Class("ConfigBase", {
this.timeout(function () {
services["dactyl:"].pages.dtd = function () [null,
- iter(config.dtdExtra, (["dactyl." + s, config[s]] for each (s in config.dtdStrings)))
- .map(function ([k, v]) ["<!ENTITY ", k, " '", String.replace(v, /'/g, "&apos;"), "'>"].join(""))
- .join("\n")]
+ iter(config.dtdExtra,
+ (["dactyl." + k, v] for ([k, v] in iter(config.dtd))),
+ (["dactyl." + s, config[s]] for each (s in config.dtdStrings)))
+ .map(function ([k, v]) ["<!ENTITY ", k, " '", String.replace(v, /'/g, "&apos;"), "'>"].join(""))
+ .join("\n")]
});
},
@@ -119,17 +121,20 @@ var ConfigBase = Class("ConfigBase", {
return version;
}),
- // TODO: DTD properties. Cleanup.
- get home() "http://dactyl.sourceforge.net/",
- get apphome() this.home + this.name,
- code: "http://code.google.com/p/dactyl/",
- get issues() this.home + "bug/" + this.name,
- get plugins() "http://dactyl.sf.net/" + this.name + "/plugins",
- get faq() this.home + this.name + "/faq",
- "list.mailto": Class.memoize(function () config.name + "@googlegroups.com"),
- "list.href": Class.memoize(function () "http://groups.google.com/group/" + config.name),
- "hg.latest": Class.memoize(function () config.code + "source/browse/"), // XXX
- "irc": "irc://irc.oftc.net/#pentadactyl",
+ dtd: memoize({
+ get home() "http://dactyl.sourceforge.net/",
+ get apphome() this.home + this.name,
+ code: "http://code.google.com/p/dactyl/",
+ get issues() this.home + "bug/" + this.name,
+ get plugins() "http://dactyl.sf.net/" + this.name + "/plugins",
+ get faq() this.home + this.name + "/faq",
+
+ "list.mailto": Class.memoize(function () config.name + "@googlegroups.com"),
+ "list.href": Class.memoize(function () "http://groups.google.com/group/" + config.name),
+
+ "hg.latest": Class.memoize(function () this.code + "source/browse/"), // XXX
+ "irc": "irc://irc.oftc.net/#pentadactyl",
+ }),
dtdExtra: {
"xmlns.dactyl": "http://vimperator.org/namespaces/liberator",
@@ -142,21 +147,11 @@ var ConfigBase = Class("ConfigBase", {
dtdStrings: [
"appName",
- "apphome",
- "code",
- "faq",
"fileExt",
- "hg.latest",
- "home",
"host",
"hostbin",
"idName",
- "irc",
- "issues",
- "list.href",
- "list.mailto",
"name",
- "plugins",
"version"
],