|
@@ -51,24 +51,24 @@ singlefile.tabsData = (() => {
|
|
|
setPersistent(tabsData);
|
|
setPersistent(tabsData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function getTemporary(tabId) {
|
|
|
|
|
|
|
+ function getTemporary(desiredTabId) {
|
|
|
if (!temporaryData) {
|
|
if (!temporaryData) {
|
|
|
temporaryData = {};
|
|
temporaryData = {};
|
|
|
}
|
|
}
|
|
|
- if (tabId !== undefined && !temporaryData[tabId]) {
|
|
|
|
|
- temporaryData[tabId] = {};
|
|
|
|
|
|
|
+ if (desiredTabId !== undefined && !temporaryData[desiredTabId]) {
|
|
|
|
|
+ temporaryData[desiredTabId] = {};
|
|
|
}
|
|
}
|
|
|
return temporaryData;
|
|
return temporaryData;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- async function getPersistent(tabId) {
|
|
|
|
|
|
|
+ async function getPersistent(desiredTabId) {
|
|
|
if (!persistentData) {
|
|
if (!persistentData) {
|
|
|
const config = await browser.storage.local.get();
|
|
const config = await browser.storage.local.get();
|
|
|
persistentData = config.tabsData || {};
|
|
persistentData = config.tabsData || {};
|
|
|
cleanup();
|
|
cleanup();
|
|
|
}
|
|
}
|
|
|
- if (tabId !== undefined && !persistentData[tabId]) {
|
|
|
|
|
- persistentData[tabId] = {};
|
|
|
|
|
|
|
+ if (desiredTabId !== undefined && !persistentData[desiredTabId]) {
|
|
|
|
|
+ persistentData[desiredTabId] = {};
|
|
|
}
|
|
}
|
|
|
return persistentData;
|
|
return persistentData;
|
|
|
}
|
|
}
|