diff --git a/filters/resources.txt b/filters/resources.txt index c9542e4d586..5351f3e9f64 100644 --- a/filters/resources.txt +++ b/filters/resources.txt @@ -2129,6 +2129,8 @@ set-constant.js application/javascript cValue = parseFloat(cValue); if ( isNaN(cValue) ) { return; } if ( Math.abs(cValue) > 0x7FFF ) { return; } + } else if ( cValue === '' ) { + // empty string constant supported } else { return; } @@ -2183,6 +2185,7 @@ set-constant.js application/javascript makeProxy(owner, chain); })(); + # Imported from: # https://github.com/NanoAdblocker/NanoFilters/blob/1f3be7211bb0809c5106996f52564bf10c4525f7/NanoFiltersSource/NanoResources.txt#L82 # @@ -2300,28 +2303,28 @@ remove-attr.js application/javascript damoh-defuser.js application/javascript (function() { - var handled = new WeakSet(); - var asyncTimer; - var cleanVideo = function() { - asyncTimer = undefined; - var v = document.querySelector('video'); - if ( v === null ) { return; } - if ( handled.has(v) ) { return; } - handled.add(v); - v.pause(); - v.controls = true; - var el = v.querySelector('meta[itemprop="contentURL"][content]'); - if ( el === null ) { return; } - v.src = el.getAttribute('content'); - el = v.querySelector('meta[itemprop="thumbnailUrl"][content]'); - if ( el !== null ) { v.poster = el.getAttribute('content'); } - }; - var cleanVideoAsync = function() { - if ( asyncTimer !== undefined ) { return; } - asyncTimer = window.requestAnimationFrame(cleanVideo); - }; - var observer = new MutationObserver(cleanVideoAsync); - observer.observe(document.documentElement, { childList: true, subtree: true }); + var handled = new WeakSet(); + var asyncTimer; + var cleanVideo = function() { + asyncTimer = undefined; + var v = document.querySelector('video'); + if ( v === null ) { return; } + if ( handled.has(v) ) { return; } + handled.add(v); + v.pause(); + v.controls = true; + var el = v.querySelector('meta[itemprop="contentURL"][content]'); + if ( el === null ) { return; } + v.src = el.getAttribute('content'); + el = v.querySelector('meta[itemprop="thumbnailUrl"][content]'); + if ( el !== null ) { v.poster = el.getAttribute('content'); } + }; + var cleanVideoAsync = function() { + if ( asyncTimer !== undefined ) { return; } + asyncTimer = window.requestAnimationFrame(cleanVideo); + }; + var observer = new MutationObserver(cleanVideoAsync); + observer.observe(document.documentElement, { childList: true, subtree: true }); })(); @@ -2369,13 +2372,13 @@ twitch-videoad.js application/javascript # https://github.com/uBlockOrigin/uAssets/issues/2912 fingerprint2.js application/javascript (function() { - let fp2 = function(){}; - fp2.prototype = { - get: function(cb) { - setTimeout(function() { cb('', []); }, 1); - } - }; - window.Fingerprint2 = fp2; + let fp2 = function(){}; + fp2.prototype = { + get: function(cb) { + setTimeout(function() { cb('', []); }, 1); + } + }; + window.Fingerprint2 = fp2; })();