1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-20 15:45:46 +01:00

Add :stopall.

This commit is contained in:
Doug Kearns
2009-05-11 01:20:45 +10:00
parent 961c84c33d
commit f73879f43e
7 changed files with 67 additions and 30 deletions

View File

@@ -527,6 +527,11 @@ function Tabs() //{{{
bang: true
});
commands.add(["stopa[ll]"],
"Stop loading all tab pages",
function () { tabs.stopAll(); },
{ argCount: "0" });
// TODO: add count support
commands.add(["tabm[ove]"],
"Move the current tab after tab N",
@@ -886,6 +891,13 @@ function Tabs() //{{{
getBrowser().mTabContainer.selectedIndex = index;
},
/**
* Reload the specified tab.
*
* @param {Object} tab The tab to reload.
* @param {boolean} bypassCache Whether to bypass the cache when
* reloading.
*/
reload: function (tab, bypassCache)
{
if (bypassCache)
@@ -899,6 +911,12 @@ function Tabs() //{{{
}
},
/**
* Reload all tabs.
*
* @param {boolean} bypassCache Whether to bypass the cache when
* reloading.
*/
reloadAll: function (bypassCache)
{
if (bypassCache)
@@ -922,6 +940,28 @@ function Tabs() //{{{
}
},
/**
* Stop loading the specified tab.
*
* @param {Object} tab The tab to stop loading.
*/
stop: function (tab)
{
if (config.stop)
config.stop(tab);
else
tab.linkedBrowser.stop();
},
/**
* Stop loading all tabs.
*/
stopAll: function ()
{
for (let [,browser] in this.browsers)
browser.stop();
},
// "buffer" is a string which matches the URL or title of a buffer, if it
// is null, the last used string is used again
switchTo: function (buffer, allowNonUnique, count, reverse)