8.0.4 #226
@ -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>}
|
||||
|
Loading…
Reference in New Issue
Block a user