diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 183647d97..2086721ce 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -309,3 +309,7 @@ deviantart.com##.dp-ad-chrome.dp-ad-visible # Also fixes https://github.com/chrisaljoudi/uBlock/issues/1271 # NBA.com @@||cdn.turner.com/*/AdManager.js$domain=cnn.com|nba.com,script + + +# To deal with https://github.com/chrisaljoudi/uBlock/issues/1013 +||mac-system-alert.com^ diff --git a/platform/safari/vapi-client.js b/platform/safari/vapi-client.js index c02270014..1f77f6142 100644 --- a/platform/safari/vapi-client.js +++ b/platform/safari/vapi-client.js @@ -230,8 +230,13 @@ var meta = document.createElement('meta'); meta.setAttribute("http-equiv", "content-security-policy"); meta.setAttribute("content", "script-src 'unsafe-eval' *"); + if(document.documentElement.firstChild) { + document.documentElement.insertBefore(meta, document.documentElement.firstChild); + } + else { + document.documentElement.appendChild(meta); + } } - document.documentElement.insertBefore(meta, document.documentElement.firstChild); document.addEventListener(vAPI.sessionId, function(e) { if(shouldBlockDetailedRequest(e.detail)) { e.detail.url = false;