Fixed 11.0.44 regression: ghost media item reported on every page.

This commit is contained in:
hackademix 2020-09-16 16:54:25 +02:00
parent dabc5023f0
commit 776b7f7f45
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ window.addEventListener("securitypolicyviolation", e => {
let type = violatedDirective.split("-", 1)[0]; // e.g. script-src 'none' => script
let url = e.blockedURI;
if (/^data\b/.test(url) && !document.querySelector("video,audio")) return;
if (!(url && url.includes(":"))) {
url = document.URL;
}