diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 1db3ebf..d209344 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -116,6 +116,9 @@ "opt_desc_openEnd": { "message": "When restore list open at the ending of tabs" }, + "opt_desc_openTabListNoTab": { + "message": "Open the tab list when store all tabs" + }, "opt_label_popup": { "message": "Popup simple list" }, diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.json index d4f4426..338b5e3 100644 --- a/src/_locales/zh_CN/messages.json +++ b/src/_locales/zh_CN/messages.json @@ -116,6 +116,9 @@ "opt_desc_openEnd": { "message": "恢复列表时标签页在末尾打开" }, + "opt_desc_openTabListNoTab": { + "message": "当储存所有标签时打开标签列表" + }, "opt_label_popup": { "message": "弹出简单列表" }, diff --git a/src/common/options.js b/src/common/options.js index 33c0474..51b918b 100644 --- a/src/common/options.js +++ b/src/common/options.js @@ -221,6 +221,14 @@ export const optionsList = [ default: true, new: '1.3.9', }, + { + cate: cate.BEHAVIOUR, + name: 'openTabListNoTab', + desc: __('opt_desc_openTabListNoTab'), + type: Boolean, + default: true, + new: '1.4.0', + }, ] if (DEBUG) { diff --git a/src/common/tabs.js b/src/common/tabs.js index 398ba35..5a51b42 100644 --- a/src/common/tabs.js +++ b/src/common/tabs.js @@ -106,13 +106,15 @@ const storeSelectedTabs = async listIndex => { const storeAllTabs = async listIndex => { const tabs = await getAllTabsInCurrentWindow() - await openTabLists() + const opts = await storage.getOptions() + if (opts.openTabListNoTab) await openTabLists() return storeTabs(tabs, listIndex) } const storeAllTabInAllWindows = async () => { const windows = await browser.windows.getAll() - await openTabLists() + const opts = await storage.getOptions() + if (opts.openTabListNoTab) await openTabLists() for (const window of windows) { const tabs = await getAllInWindow(window.id) await storeTabs(tabs) diff --git a/src/manifest.json b/src/manifest.json index e829fd2..37d154f 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "__MSG_ext_name__", - "version": "1.3.10", + "version": "1.4.0", "default_locale": "en", "description": "__MSG_ext_desc__", "author": "WangJie ",