X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=teledactyl%2Fcontent%2Fconfig.js;h=3a883ae9f7f0d8b879b39fa89d98e6ab09db7424;hb=70740024f9c028c1fd63e1a1850ab062ff956054;hp=67586e81f1ab3783e5874a2e404146bf02b9117f;hpb=eeed0be1a8abf7e3c97f43b63c1d595e940fef21;p=dactyl.git diff --git a/teledactyl/content/config.js b/teledactyl/content/config.js index 67586e8..3a883ae 100644 --- a/teledactyl/content/config.js +++ b/teledactyl/content/config.js @@ -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: <> }); }, - 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"])),