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:
@@ -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 () {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user