- Rémi (@remusao)
- Bump @types/node from 16.11.10 to 17.0.8 #2350 (@dependabot[bot])
- Bump @types/node from 15.6.1 to 16.9.6 #2235 (@dependabot[bot])
- @dependabot[bot]
- Rémi (@remusao)
- Bump @rollup/plugin-node-resolve from 11.2.1 to 13.0.0 #1912 (@dependabot[bot])
- @dependabot[bot]
- Rémi (@remusao)
- build(deps-dev): bump @types/node from 14.14.41 to 15.0.0 (@dependabot-preview[bot])
- build(deps-dev): bump auto from 10.25.1 to 10.25.2 #1892 (@dependabot-preview[bot])
- build(deps): bump tldts-experimental from 5.7.29 to 5.7.30 #1889 (@dependabot-preview[bot])
- build(deps-dev): bump @types/node from 14.14.41 to 15.0.0 #1888 (@dependabot-preview[bot])
- Rémi (@remusao)
- Rémi (@remusao)
Initial support for extended CSS selectors (a.k.a. procedural filters) (#1574)
Add initial support for extended CSS selectors (a.k.a. procedural filters) as well as the :remove()
modifier for element hiding rules (note: the already supported :style
modified now also works with extended CSS selectors). The following new pseudo-classes are implemented: :has
(and its alias :if
), :has-text
(both string and RegExp literals), and :not
(whenever its argument is also an extended selector, otherwise fallback to native implementation).
Caveats:
- Loading of extended css filters is disabled by default and needs to be toggled using the
loadExtendedSelectors
option while initializing the blocker instance. - These news selectors are currently only supported by
WebExtensionBlocker
(support for Puppeteer, Electron and Playwright is not planned at this time but help from the community would be greatly appreciated).
Miscellaneous changes:
- Removal of unused
injectCSSRule
helper. - Replace Closure compiler by Terser.
- Rémi (@remusao)
- build(deps-dev): bump @rollup/plugin-node-resolve from 10.0.0 to 11.0.0 (@dependabot-preview[bot])
- build(deps-dev): bump @rollup/plugin-node-resolve from 10.0.0 to 11.0.0 #1478 (@dependabot-preview[bot])
- Rémi (@remusao)
- build(deps-dev): bump @rollup/plugin-node-resolve from 9.0.0 to 10.0.0 (@dependabot-preview[bot])
- build(deps-dev): bump @rollup/plugin-node-resolve from 9.0.0 to 10.0.0 #1373 (@dependabot-preview[bot])
- build(deps-dev): bump typescript from 3.9.7 to 4.0.2 (@dependabot-preview[bot])
- build(deps-dev): bump @rollup/plugin-node-resolve from 8.4.0 to 9.0.0 (@dependabot-preview[bot])
- build(deps-dev): bump typescript from 3.9.7 to 4.0.2 #1202 (@dependabot-preview[bot])
- build(deps-dev): bump @rollup/plugin-node-resolve from 8.4.0 to 9.0.0 #1181 (@dependabot-preview[bot])
- Update deps #1107 (@remusao)
- @dependabot-preview[bot]
- Rémi (@remusao)
- build(deps-dev): bump @types/jsdom from 12.2.4 to 16.2.3 #885 (@dependabot-preview[bot])
- build(deps-dev): bump @ampproject/rollup-plugin-closure-compiler (@dependabot-preview[bot])
- build(deps-dev): bump @ampproject/rollup-plugin-closure-compiler from 0.25.2 to 0.26.0 #956 (@dependabot-preview[bot])
- build(deps-dev): bump @rollup/plugin-node-resolve from 7.1.3 to 8.0.0 (@dependabot-preview[bot])
- build(deps-dev): bump @rollup/plugin-node-resolve from 7.1.3 to 8.0.0 #907 (@dependabot-preview[bot])
- build(deps-dev): bump rollup-plugin-sourcemaps from 0.5.0 to 0.6.1 (@dependabot-preview[bot])
- build(deps-dev): bump rollup-plugin-sourcemaps from 0.5.0 to 0.6.1 #830 (@dependabot-preview[bot])
- build(deps-dev): bump @ampproject/rollup-plugin-closure-compiler (@dependabot-preview[bot])
- build(deps-dev): bump @ampproject/rollup-plugin-closure-compiler from 0.24.0 to 0.25.0 #766 (@dependabot-preview[bot])
From #746
- Make sure that all unsupported procedural selectors from cosmetic filters are dropped to ensure that we only inject valid CSS selectors.
- Fix matching of
domain=
option for domain filters in cases where specified domain is a subdomain instead of full hostname or full domain. - Fix partyness detection for requests without a valid domain (but having a valid hostname). This fixes matching against localhost request (for instance).
- Fix engine updates stress test which allows to replay all day-to-day diffs since the beginning of times... (currently about a year) and make sure that all updates work and resulting engine is byte-identical with diff-update or full initialization.
- Fix script to analyze size of serialized engines for all presets as well as all kinds of compression (i.e. none, gzip and brotli). This allows to keep track of final size after small-strings compression was applied.
- Rémi (@remusao)
From #738
- Add
guessRequestTypeFromUrl
config option to all blocker classes which allows to automatically guess the type of network requests based on their URLs. This can be useful for cases where the type is either not available or not accurately inferred (e.g. when requests have time 'other'). - Fix a case where
PuppeteerBlocker
could show an async unhandled exception in console when trying to remove blocked iframes in pages. - Fix redirection to binary resources (i.e. base64 encoded). An issue caused these resources to be corrupted which means that redirected resources were not valid (e.g. invalid PNG image).
- Redirection to local resources has been improved and will now always succeed thanks to a system of fallback. More types are also available for redirection.
- Improve API of blocker classes (i.e. PuppeteerBlocker, ElectronBlocker and WebExtensionBlocker) to allow creating custom blocking logic of resources using:
blockScripts
,blockImages
,blockMedias
,blockFrames
,blockFonts
, andblockStyles
. These helpers can be called on any existing blocker instance, or on a new one created with theempty()
static method. - Add initial DSL (Domain Specific Language) to create blocking rules with a high-level API. This is used behind the scene to implement the new blocking methods now exposed by blocker instances. This new DSL should be considered alpha-quality and the API will likely change (and break) in the future. It might also be extended to handle hiding rules (a.k.a cosmetic filters).
- Fix behavior of
NetworkFilter#toString
which should now return a better pretty-printed version of the original filters whenever thedebug
option was false (in which case some information about the original raw string is lost and the string version needs to be inferred back). - Implement handling of data: URLs. This means that the Request abstraction will now treat them as valid requests and that their type should always be inferred correctly. Moreover, the matching of data: URLs will now only take into account the prefix and ignore anything following the ',' separator.
- Requests with empty domain will not be treated as third-party anymore (this should not happen in the wild and was mostly impacting our unit tests).
- Rémi (@remusao)
- Rémi (@remusao)
From #690
PuppeteerBlocker is now more powerful and will be able to better block ads on most websites. Firstly, a bug was fixed which prevented injection of cosmetics in the main frame of pages. Secondly, PuppeteerBlocker will now monitor the DOM for changes to make sure that ads which load later are still "handled" (if you know what I mean). Lastly, PuppeteerBlocker is now able to look for advertisement iframes and remove them from the DOM completely, no more blank spaces left unattended...
- Rémi (@remusao)
- Rémi (@remusao)
- Rémi (@remusao)
- build(deps-dev): bump @ampproject/rollup-plugin-closure-compiler
Bumps @ampproject/rollup-plugin-closure-compiler from 0.21.0 to 0.22.2.
Signed-off-by: dependabot-preview[bot] support@dependabot.com (@dependabot-preview[bot])
- Rémi (@remusao)