Vivaldi Native ad-blocking
-
Hello!
I want to block an annoying in-line script on a site.
<script type="text/javascript"> document.addEventListener("DOMContentLoaded", function(event) { var req = new Request('https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', { method: 'HEAD', mode: 'no-cors' }); fetch(req).then(function (resp) { return resp; }).then(function () { }).catch(function (e) { var old = localStorage.getItem('adpt'); if (!old || (Date.parse(old) < new Date())) { var date = new Date(); date.setDate(date.getDate() + 7); localStorage.setItem('adpt', date); localStorage.setItem('adpv', true); window.location.replace('/advertisement.php'); } }); if (localStorage.getItem('adpv') == 'true') { localStorage.removeItem('adpv'); var el = document.getElementById('x-pop'); el.style.display = 'flex'; } }); function closeXPop() { var el = document.getElementById('x-pop'); el.style.display = 'none'; } </script>
working with ublock origin :
example.com##^script:has-text(pagead2.googlesyndication.com/pagead/js/adsbygoogle.js)
but if i create my filter.txt and add it to vivaldi, the inline script blocking does not work in vivaldi's native adblocker
-
@summoner Hi - the Vivaldi adblocker supports the basic Adblock Plus ruleset.
https://adblockplus.org/filter-cheatsheetSo that syntax isn't going to work. If you need more advanced control of blocking uBO is the way to go - for the moment at least.