8.0.4 #226

Merged
wanhose merged 9 commits from v8.0.4 into main 2024-11-11 12:44:07 +00:00
Showing only changes of commit 2390960d21 - Show all commits

View File

@ -125,15 +125,6 @@ async function getData() {
return data;
}
/**
* @async
* @description Disable report context menu option
* @returns {Promise<void>}
*/
async function disableReport() {
return browser.contextMenus.update(reportMenuItemId, { enabled: false });
}
/**
* @description Get current hostname
* @param {string} url
@ -288,9 +279,6 @@ browser.runtime.onMessage.addListener((message, sender, callback) => {
const tabId = sender.tab?.id;
switch (message.type) {
case 'DISABLE_REPORT':
if (isPage && tabId !== undefined) disableReport();
break;
case 'DISABLE_ICON':
if (isPage && tabId !== undefined) {
browser.action.setIcon({ path: '/assets/icons/off.png', tabId }, suppressLastError);
@ -396,13 +384,6 @@ browser.runtime.onStartup.addListener(() => {
refreshData();
});
/**
* @description Listen to tab changes
*/
browser.tabs.onActivated.addListener(() => {
disableReport();
});
/**
* @description Listen to the moment before a request is made to apply the rules
* @returns {Promise<void>}