From 84bfe683c5d73a72dca06479970a39f5c7d8445d Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 29 Mar 2020 23:38:20 -0400 Subject: [PATCH] renamed the background --- src/js/background/backgroundLogic.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/background/backgroundLogic.js b/src/js/background/backgroundLogic.js index 253ea3e..93be0fc 100644 --- a/src/js/background/backgroundLogic.js +++ b/src/js/background/backgroundLogic.js @@ -237,7 +237,7 @@ const backgroundLogic = { return identitiesOutput; }, - async reorganize() { + async sortTabsByWindow() { let windows = await browser.windows.getAll(); let containers = new Set(); for (const windowObj of windows) { @@ -250,7 +250,7 @@ const backgroundLogic = { for (let i = 0; i < containers.length; i++) { const windowId = (i < windows.length) ? windows[i].id : -1; - await this._reorganizeInternal(windowId, containers[i]); + await this._sortTabsByWindowInternal(windowId, containers[i]); } windows = await browser.windows.getAll(); for (let i = containers.length; i < windows.length; i++) { @@ -258,7 +258,7 @@ const backgroundLogic = { } }, - async _reorganizeInternal(windowId, cookieStoreId) { + async _sortTabsByWindowInternal(windowId, cookieStoreId) { let createNew = false; let tabs = await browser.tabs.query({ "cookieStoreId": cookieStoreId @@ -274,7 +274,7 @@ const backgroundLogic = { }); if (createNew) { tabs = await browser.tabs.query({windowId: windowId}); - for (let tab of tabs) { // eslint-disable-line prefer-const + for (const tab of tabs) { if (tab.cookieStoreId !== cookieStoreId) { browser.tabs.remove(tab.id); }