1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 17:25:45 +01:00

Remember last focused frame

This commit is contained in:
Kris Maglione
2008-11-21 06:35:27 +00:00
parent 2d7036b917
commit d4ef9cee7a
4 changed files with 37 additions and 38 deletions

View File

@@ -674,14 +674,20 @@ function Tabs() //{{{
get count() getBrowser().mTabs.length,
// used for :setlocal
get options()
{
var tab = this.getTab();
if (!tab.liberatorOptions)
tab.liberatorOptions = {};
let store = this.localStore;
if (!("options" in store))
store.options = {};
return store.options;
},
return tab.liberatorOptions;
get localStore()
{
let tab = this.getTab();
if (!tab.liberatorStore)
tab.liberatorStore = {};
return tab.liberatorStore;
},
get tabStrip()
@@ -696,15 +702,7 @@ function Tabs() //{{{
index: function (tab)
{
if (tab)
{
var length = getBrowser().mTabs.length;
for (let i = 0; i < length; i++)
{
if (getBrowser().mTabs[i] == tab)
return i;
}
return -1;
}
return Array.indexOf(getBrowser().mTabs, tab);
return getBrowser().mTabContainer.selectedIndex;
},
@@ -737,7 +735,7 @@ function Tabs() //{{{
getTab: function (index)
{
if (index)
if (index != undefined)
return getBrowser().mTabs[index];
return getBrowser().mTabContainer.selectedItem;