搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Revoke mandatory extension permission

  • 無回覆
  • 1 有這個問題
  • 4 次檢視
more options

Is it possible to revoke 'tabs' permission from an addon that grants it by default?

I modified the script provided here (https://support.mozilla.org/en-US/questions/1257097), I got a successful message but permission is still there.

browser.permissions.getAll().then(resp => {

 if (resp.permissions.length == 0){
   console.log('There are no permissions for this extension');
 } else {
   if (resp.permissions.includes('tabs')){
     console.log('Attempting to remove "tabs" permission --');
     browser.permissions.remove({permissions: ["tabs"]}).then(msg => {
       console.log('Removal successful (' + msg + ')');}).catch(err => {
       console.log('Problem: ' + err)});
   } else {
     console.log('Did not find the "tabs" permission, but found these: [' + resp.permissions.join(',') + ']');
   }
 }

});

thanks

Is it possible to revoke 'tabs' permission from an addon that grants it by default? I modified the script provided here (https://support.mozilla.org/en-US/questions/1257097), I got a successful message but permission is still there. browser.permissions.getAll().then(resp => { if (resp.permissions.length == 0){ console.log('There are no permissions for this extension'); } else { if (resp.permissions.includes('tabs')){ console.log('Attempting to remove "tabs" permission --'); browser.permissions.remove({permissions: ["tabs"]}).then(msg => { console.log('Removal successful (' + msg + ')');}).catch(err => { console.log('Problem: ' + err)}); } else { console.log('Did not find the "tabs" permission, but found these: [' + resp.permissions.join(',') + ']'); } } }); thanks