summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/content/buffer.js3
-rw-r--r--common/content/configbase.js5
-rw-r--r--muttator/content/config.js2
-rw-r--r--vimperator/content/config.js3
-rw-r--r--xulmus/content/config.js6
5 files changed, 10 insertions, 9 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js
index 3c265d89..835d9252 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -43,8 +43,7 @@ function Buffer() //{{{
/////////////////////////////////////////////////////////////////////////////{{{
// FIXME: This doesn't belong here.
- let mainWindowID = config.mainWindowID || "main-window";
- let fontSize = util.computedStyle(document.getElementById(mainWindowID)).fontSize;
+ let fontSize = util.computedStyle(document.getElementById(config.mainWindowID)).fontSize;
styles.registerSheet("chrome://liberator/skin/liberator.css");
let error = styles.addSheet(true, "font-size", "chrome://liberator/content/buffer.xhtml",
diff --git a/common/content/configbase.js b/common/content/configbase.js
index 711d07b9..c75ea6d0 100644
--- a/common/content/configbase.js
+++ b/common/content/configbase.js
@@ -92,6 +92,11 @@ const configbase = { //{{{
ignoreKeys: {}, // XXX: be aware you can't put useful values in here, as "modes.NORMAL" etc. are not defined at this time
/**
+ * @property {string} The ID of the application's main XUL window.
+ */
+ mainWindowID: document.documentElement.id,
+
+ /**
* @property {[[]]} An array of application specific mode specifications.
* The values of each mode are passed to modes.addMode during
* liberator startup.
diff --git a/muttator/content/config.js b/muttator/content/config.js
index dd6b295d..1ddfbc31 100644
--- a/muttator/content/config.js
+++ b/muttator/content/config.js
@@ -30,6 +30,7 @@ const config = { //{{{
/*** required options, no checks done if they really exist, so be careful ***/
name: "Muttator",
hostApplication: "Thunderbird", // TODO: can this be found out otherwise? gBrandBundle.getString("brandShortName");
+ get mainWindowID() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow",
/*** optional options, there are checked for existence and a fallback provided ***/
features: ["hints", "mail", "marks", "addressbook", "tabs"],
@@ -50,7 +51,6 @@ const config = { //{{{
get mailModes() [modes.NORMAL],
// focusContent() focuses this widget
get mainWidget() this.isComposeWindow ? document.getElementById("content-frame") : GetThreadTree(),
- get mainWindowID() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow",
get visualbellWindow() document.getElementById(this.mainWindowID),
styleableChrome: "chrome://messenger/content/messenger.xul,chrome://messenger/content/messengercompose/messengercompose.xul",
diff --git a/vimperator/content/config.js b/vimperator/content/config.js
index e319fd43..1dc7219d 100644
--- a/vimperator/content/config.js
+++ b/vimperator/content/config.js
@@ -485,8 +485,7 @@ const config = { //{{{
{
try
{
- let id = config.mainWindowID || "main-window";
- document.getElementById(id).setAttribute("titlemodifier", value);
+ document.getElementById(config.mainWindowID).setAttribute("titlemodifier", value);
if (window.content.document.title.length > 0)
document.title = window.content.document.title + " - " + value;
else
diff --git a/xulmus/content/config.js b/xulmus/content/config.js
index 6ac9546d..a1991f06 100644
--- a/xulmus/content/config.js
+++ b/xulmus/content/config.js
@@ -32,7 +32,7 @@ const config = { //{{{
/*** required options, no checks done if they really exist, so be careful ***/
name: "Xulmus",
hostApplication: "Songbird",
- //mainWindowID: "mainplayer",
+
/*** optional options, there are checked for existence and a fallback provided ***/
features: ["bookmarks", "hints", "marks", "history", "quickmarks", "session", "tabs", "windows", "player"],
defaults: {
@@ -48,7 +48,6 @@ const config = { //{{{
get isPlayerWindow() SBGetBrowser().mCurrentTab == SBGetBrowser().mediaTab,
// focusContent() focuses this widget gSongbirdWindowController takes care of the focus.
- get mainWindowID() "mainplayer",
get visualbellWindow() document.getElementById(this.mainWindowID),
styleableChrome: "chrome://gonzo/content/xul/mainplayer.xul",
@@ -537,8 +536,7 @@ const config = { //{{{
{
try
{
- let id = this.mainWindowID || "mainplayer";
- document.getElementById(id).setAttribute("titlemodifier", value);
+ document.getElementById(config.mainWindowID).setAttribute("titlemodifier", value);
if (window.content.document.title.length > 0)
document.title = window.content.document.title + " - " + value;
else