1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 18:27:59 +01:00

And xulmus was born.

This commit is contained in:
Doug Kearns
2009-03-16 15:54:02 +11:00
parent 9f70457a4a
commit 80beaa41df
61 changed files with 7085 additions and 36 deletions

View File

@@ -109,7 +109,10 @@ function Tabs() //{{{
// hide tabs initially
if (config.name == "Vimperator")
getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0].collapsed = true;
/*
if (config.name == "Xulmus")
getBrowser()._strip.getElementsByClassName(
*/
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
@@ -148,7 +151,7 @@ function Tabs() //{{{
validator: Option.validateCompleter
});
if (config.name == "Vimperator")
if (config.name == "Vimperator" || config.name == "Xulmus" )
{
options.add(["activate", "act"],
"Define when tabs are automatically activated",
@@ -238,7 +241,7 @@ function Tabs() //{{{
function (count) { tabs.select("-" + (count < 1 ? 1 : count), true); },
{ flags: Mappings.flags.COUNT });
if (config.name == "Vimperator")
if (config.name == "Vimperator" || config.name == "Xulmus")
{
mappings.add([modes.NORMAL], ["b"],
"Open a prompt to switch buffers",
@@ -449,7 +452,7 @@ function Tabs() //{{{
function () { tabs.select(0, false); },
{ argCount: "0" });
if (config.name == "Vimperator")
if (config.name == "Vimperator" || config.name == "Xulmus")
{
// TODO: "Zero count" if 0 specified as arg, multiple args and count ranges?
commands.add(["b[uffer]"],
@@ -584,7 +587,7 @@ function Tabs() //{{{
});
}
if (liberator.has("session"))
if (liberator.has("session") && config.name != "Xulmus")
{
// TODO: extract common functionality of "undoall"
commands.add(["u[ndo]"],
@@ -780,6 +783,22 @@ function Tabs() //{{{
getBrowser().removeTab(tab);
else
liberator.beep();
},
Songbird: function (tab)
{
if (getBrowser().mTabs.length > 1)
getBrowser().removeTab(tab);
else
{
if (buffer.URL != "about:blank" ||
window.getWebNavigation().sessionHistory.count > 0)
{
liberator.open("about:blank", liberator.NEW_BACKGROUND_TAB);
getBrowser().removeTab(tab);
}
else
liberator.beep();
}
}
}[config.hostApplication] || function () {};