Index: inject.preload.js |
=================================================================== |
--- a/inject.preload.js |
+++ b/inject.preload.js |
@@ -20,17 +20,17 @@ |
let randomEventName = "abp-request-" + Math.random().toString(36).substr(2); |
// Proxy "should we block?" messages from checkRequest inside the injected |
// code to the background page and back again. |
document.addEventListener(randomEventName, event => |
{ |
let {url, requestType} = event.detail; |
- ext.backgroundPage.sendMessage({ |
+ chrome.runtime.sendMessage({ |
type: "request.blockedByWrapper", |
requestType, |
url |
}, block => |
{ |
document.dispatchEvent(new CustomEvent( |
randomEventName + "-" + requestType + "-" + url, {detail: block} |
)); |