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

Ditch the bloody chrome registry.

This commit is contained in:
Kris Maglione
2011-01-13 16:04:32 -05:00
parent 203730ae62
commit 6fcd00e8ca
15 changed files with 122 additions and 101 deletions

View File

@@ -594,10 +594,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (context && context.INFO instanceof XML) {
let info = context.INFO;
if (info.*.@lang.length()) {
let langs = set(String(a) for each (a in info.*.@lang));
let lang = [config.language, config.language.replace(/-.*/, ""),
"en", "en-US", info.*.@lang[0]
].filter(function (l) set.has(langs, l))[0];
let lang = config.bestLocale(String(a) for each (a in info.*.@lang));
info.* = info.*.(function::attribute("lang").length() == 0 || @lang == lang);
@@ -613,7 +610,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
let help =
'<?xml version="1.0"?>\n' +
'<?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?>\n' +
'<!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">\n' +
'<!DOCTYPE document SYSTEM "resource://dactyl-content/dactyl.dtd">\n' +
unescape(encodeURI( // UTF-8 handling hack.
<document xmlns={NS}
name="plugins" title={config.appName + " Plugins"}>