mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 00:28:00 +01:00
Simplify tabs.tabStrip definition.
This commit is contained in:
@@ -40,6 +40,7 @@ function Tabs() //{{{
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
var tabmail;
|
||||
// FIXME: doesn't belong here
|
||||
var getBrowser = (function () {
|
||||
if (config.hostApplication == "Thunderbird")
|
||||
{
|
||||
@@ -60,15 +61,6 @@ function Tabs() //{{{
|
||||
return window.getBrowser;
|
||||
})();
|
||||
|
||||
// FIXME: why is this app specific conditional code here?
|
||||
// Why the distinction? Why not just mStrip? --djk
|
||||
if (config.hostApplication == "Firefox")
|
||||
var tabStrip = getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0];
|
||||
else if (/^(Thunderbird|Songbird)$/.test(config.hostApplication))
|
||||
tabStrip = getBrowser().mStrip;
|
||||
else
|
||||
tabStrip = null;
|
||||
|
||||
var alternates = [getBrowser().mCurrentTab, null];
|
||||
|
||||
// used for the "gb" and "gB" mappings to remember the last :buffer[!] command
|
||||
@@ -118,7 +110,8 @@ function Tabs() //{{{
|
||||
services.get("sessionStore").setTabState(to, tabState);
|
||||
}
|
||||
|
||||
// hide tabs initially to prevent flickering when 'stal' is unset
|
||||
// hide tabs initially to prevent flickering when 'stal' would hide them
|
||||
// on startup
|
||||
if (config.hasTabbrowser)
|
||||
getBrowser().mStrip.collapsed = true;
|
||||
|
||||
@@ -749,7 +742,7 @@ function Tabs() //{{{
|
||||
/**
|
||||
* @property {Object} The tab browser strip.
|
||||
*/
|
||||
get tabStrip() tabStrip,
|
||||
get tabStrip() getBrowser().mStrip,
|
||||
|
||||
/**
|
||||
* @property {Object[]} The array of closed tabs for the current
|
||||
|
||||
Reference in New Issue
Block a user