2
我試圖刪除此監聽器在谷歌Chrome擴展阻止網址,但我不知道如何!Chrome擴展如何刪除chrome.webRequest.onBeforeRequest上的監聽器
chrome.webRequest.onBeforeRequest.addListener(
function(info) {
console.log("Chat intercepted: " + info.url);
return {cancel: true}; },
{urls: ["https://sampleUrl/*"]},
["blocking"]
);
與好的答案有效地相同,但不是有效的dup目標:[如何刪除由addEventListener以事件對象爲參數的匿名函數](http://stackoverflow.com/q/40668396/3773011) – Makyen