chrome.webRequest.onBeforeRequest callback's parameter details.initiator is only a origin ,how to find the specific URL?

92 Views Asked by At

for example:
how blocking 'bar.com/ad.js','barxxx.com/adxxx.js' in the tab 'foo.com/'. dont blocking 'bar.com/ad.js','barxxx.com/adxxx.js' in the tab 'foo.com/09'

chrome.webRequest.onBeforeRequest.addListener(
  callback: function,
  filter: RequestFilter,
  extraInfoSpec?: OnBeforeRequestOptions[],
)

callback function' Object parameter has a property: 'initiator'

initiator string optional

Chrome 63+ The origin where the request was initiated. This does not change through redirects. If this is an opaque origin, the string 'null' will be used.

0

There are 0 best solutions below