1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 06:22:26 +01:00

Allow :q! and :qa!, as in vim.

This commit is contained in:
Kris Maglione
2008-09-15 21:24:51 +00:00
parent a0cbde84b1
commit 7c19363383
2 changed files with 18 additions and 20 deletions

View File

@@ -471,9 +471,9 @@ liberator.Tabs = function () //{{{
liberator.commands.add(["quita[ll]", "qa[ll]"],
"Quit " + liberator.config.name,
function ()
function (args, special)
{
liberator.quit(false);
liberator.quit(false, special);
},
{ argCount: "0" });
@@ -743,11 +743,8 @@ liberator.Tabs = function () //{{{
// quitOnLastTab = 2: quit and save session
remove: function (tab, count, focusLeftTab, quitOnLastTab)
{
var removeOrBlankTab = (function ()
{
if (liberator.config.hostApplication == "Firefox")
{
return function (tab)
var removeOrBlankTab = {
Firefox: function (tab)
{
if (getBrowser().mTabs.length > 1)
getBrowser().removeTab(tab);
@@ -762,20 +759,15 @@ liberator.Tabs = function () //{{{
else
liberator.beep();
}
};
}
else if (liberator.config.hostApplication == "Thunderbird")
{
return function (tab)
},
Thunderbird: function (tab)
{
if (getBrowser().mTabs.length > 1)
getBrowser().removeTab(tab);
else
liberator.beep();
};
}
return function () { return null; };
})();
}
}[liberator.config.hostApplication] || function () {};
if (typeof count != "number" || count < 1)
count = 1;