]> git.donarmstrong.com Git - dactyl.git/blobdiff - teledactyl/content/config.js
Import 1.0b7.1 supporting Firefox up to 8.*
[dactyl.git] / teledactyl / content / config.js
index 67586e81f1ab3783e5874a2e404146bf02b9117f..3a883ae9f7f0d8b879b39fa89d98e6ab09db7424 100644 (file)
@@ -4,7 +4,7 @@
 // given in the LICENSE.txt file included with this file.
 "use strict";
 
-const Config = Module("config", ConfigBase, {
+var Config = Module("config", ConfigBase, {
     name: "teledactyl",
     appName: "Teledactyl",
     idName: "TELEDACTYL",
@@ -16,12 +16,16 @@ const Config = Module("config", ConfigBase, {
         init: function init() {
             init.superapply(this, arguments);
 
-            modules.__defineGetter__("content", function () window.content);
+            if (!("content" in modules))
+                modules.__defineGetter__("content", function () window.content);
 
             util.overlayWindow(window, { append: <><hbox id="statusTextBox" flex=""/></> });
         },
 
-        get browser() window.getBrowser(),
+        get browser()
+            let (tabmail = document.getElementById('tabmail'))
+                tabmail && tabmail.tabInfo.length ? tabmail.getBrowserForSelectedTab()
+                                                  : document.getElementById("messagepane"),
 
         get commandContainer() document.documentElement.id,
 
@@ -33,6 +37,8 @@ const Config = Module("config", ConfigBase, {
             get mStrip() this.tabStrip,
             get browsers() [browser for (browser in Iterator(this.mTabs))],
 
+            removeTab: function removeTab(tab) this.closeTab(tab),
+
             loadOneTab: function loadOneTab(uri) {
                 return this.openTab("contentTab", { contentPage: uri });
             },
@@ -137,7 +143,7 @@ const Config = Module("config", ConfigBase, {
     },
 
     /*** optional options, there are checked for existence and a fallback provided  ***/
-    features: Class.memoize(function () set(
+    features: Class.memoize(function () Set(
         this.isComposeWindow ? ["addressbook"]
                              : ["hints", "mail", "marks", "addressbook", "tabs"])),