aboutsummaryrefslogtreecommitdiff
path: root/src/background
diff options
context:
space:
mode:
Diffstat (limited to 'src/background')
-rw-r--r--src/background/actions/command.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/background/actions/command.js b/src/background/actions/command.js
index a6e426a..fb8ff98 100644
--- a/src/background/actions/command.js
+++ b/src/background/actions/command.js
@@ -25,6 +25,14 @@ const tabcloseCommand = async() => {
return browser.tabs.remove(got.map(tab => tab.id));
};
+const tabcloseAllCommand = () => {
+ return browser.tabs.query({
+ currentWindow: true
+ }).then((tabList) => {
+ return browser.tabs.remove(tabList.map(tab => tab.id));
+ });
+};
+
const winopenCommand = (url) => {
return browser.windows.create({ url });
};
@@ -113,6 +121,9 @@ const exec = (tab, line, settings) => {
case 'q':
case 'quit':
return tabcloseCommand();
+ case 'qa':
+ case 'quitall':
+ return tabcloseAllCommand()
case '':
return Promise.resolve();
}