Commit Graph

6570 Commits

Author SHA1 Message Date
Raymond Hill 39e2a03edb
Fix comment 2019-05-14 09:31:51 -04:00
Raymond Hill a14dcecf8f
Do not assume wildcards fall on label boundaries
Related commit:
- fe0b7a0e0f

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/572#issuecomment-492223980
2019-05-14 09:29:45 -04:00
Raymond Hill 93f80eedfa
Refactor runtime storage of specific cosmetic filters
This was a TODO item:
- 07cbae66a4/src/js/cosmetic-filtering.js (L375)

µBlock.staticExtFilteringEngine.HostnameBasedDB has been
re-factored to accomodate the storing of specific cosmetic
filters.

As a result of this refactoring:

- Memory usage has been further decreased
- Performance of selector retrieval marginally
  improved
- New internal representation opens the door
  to use a specialized version of HNTrie, which
  should further improve performance/memory
  usage
2019-05-14 08:52:34 -04:00
Raymond Hill 8a312b9bbb
Support cases with more than one wildcard
Related commit:
- fe0b7a0e0f

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/572#issuecomment-492147440
2019-05-14 06:52:13 -04:00
Raymond Hill 255a89910a
Make Firefox dev build auto-update 2019-05-13 20:30:19 -04:00
Raymond Hill 1df4034076
New revision for dev build 2019-05-13 20:23:46 -04:00
Raymond Hill fe0b7a0e0f
Relax destination hostname requirements in redirect filters
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/572

Wildcards are now allowed in the hostname part of redirect
filters. There will be an attempt to find the longest
right-hand portion of the hostname with no wildcard. If
no non-empty hostname can be extracted, `*` will be used.
2019-05-13 20:19:10 -04:00
Raymond Hill 1e40f50eb3
Add benchmark method to cosmetic filtering engine
To measure retrieval of site-specific selectors. From
uBO's own dev console:

    µBlock.cosmeticFilteringEngine.benchmark();
2019-05-12 11:41:47 -04:00
Raymond Hill fbb4950b5d
Make Firefox dev build auto-update 2019-05-11 17:52:39 -04:00
Raymond Hill 8ec0138739
Err... again: new revision for dev build 2019-05-11 17:48:58 -04:00
Raymond Hill 5d62782b3f
New (proper) revision for dev build 2019-05-11 17:46:58 -04:00
Raymond Hill db2e2ce0c9
New revision for dev build 2019-05-11 17:42:08 -04:00
Raymond Hill 57890d60ff
Fix incorrect use of `this` in static method
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/568

Regression from:
- 19ece97b0c
2019-05-11 17:40:55 -04:00
Raymond Hill 8a7e704080
Add support for `nth-ancestor` operator in HTML filtering
Also opportunitisically converted some code to
ES6's `class`.
2019-05-11 13:21:23 -04:00
Raymond Hill d42d86dd12
Make Firefox dev build auto-update 2019-05-11 10:53:03 -04:00
Raymond Hill 915c1f1f3c
Report resources blocked by `csp=` option in logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/552
2019-05-11 10:40:34 -04:00
Raymond Hill 12bdd01595
Ensure "Ignore generic cosmetic filters" sticks on Fennec
Related issue:
- https://www.reddit.com/r/uBlockOrigin/comments/blkudl/

The setting was not sticking at first-install time.
2019-05-11 09:04:13 -04:00
Raymond Hill 93576c096e
New revision for dev build 2019-05-10 18:55:55 -04:00
Raymond Hill 5c85c3ac8b
New revision for stable release 2019-05-10 17:32:44 -04:00
Raymond Hill ac1a323918
Import translation work from https://crowdin.com/project/ublock 2019-05-10 17:26:34 -04:00
Raymond Hill 6f0ec6129a
Make Firefox dev build auto-update 2019-05-06 15:19:23 -04:00
Raymond Hill e59bdb1485
Defuse `fixed` position on `body` element in element zapper
The `fixed` style property on the `body` element will be
defused if an overlay element is removed using the element
zapper.

Related:
- https://www.reddit.com/r/uBlockOrigin/comments/bktxtb/scrolling_doesnt_work/emlscyz
2019-05-06 13:32:55 -04:00
Raymond Hill 26237d6d40
Import translation work from https://crowdin.com/project/ublock 2019-05-06 11:39:41 -04:00
Raymond Hill bacb1e042b
New revision for dev build 2019-05-06 11:38:08 -04:00
Raymond Hill 9dfb570aa8
Use `browser_specific_settings` instead of `applications`
As per MDN's documentation, `applications` is a non-standard
alias for `browser_specific_settings` in `manifest.json`:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings#Browser_compatibility

Best to use the official manifest key.
2019-05-06 11:34:15 -04:00
Raymond Hill 3692bb4ada
Add HNTrieRef.dump() and STrieRef.dump() as dev tool
To be used at the console, as an investigation tool for
development purpose.

Using it to verify the content of the largest
FilterHostnameDict instance, I spotted an all-uppercase
hostname in the HNTrieRef instance:

µBlock.staticNetFilteringEngine.categories.get(0).get(0x10000000).dict.dump();

Thus the changes to static-net-filtering.js are to fix
the erroneous insertion of filters with uppercase
characters. The single instance found was a hostname entry
in Malware Domain List (TRIANGLESERVICESLTD dot COM).
2019-05-06 11:12:39 -04:00
Raymond Hill b654d883df
Revert "Add Energized Blu Go as stock multipurpose list"
I was made awars of license issue:
- https://github.com/AdroitAdorKhan/EnergizedProtection/issues/46

This reverts commit 0991a1138e.
2019-05-02 06:29:40 -04:00
Raymond Hill ca369d315e
Make Firefox dev build auto-update 2019-05-01 20:17:26 -04:00
Raymond Hill 21b19499a7
Nre revision for release candidate 2019-05-01 20:06:31 -04:00
Raymond Hill ce488d9fc8
Import translation work from https://crowdin.com/project/ublock 2019-05-01 20:05:16 -04:00
Raymond Hill 0e4fbefd07
Remove unecessary `null` placeholders FilterOriginHitSet et al.
The `null` placeholder are not necessary, we can just use
default arguments instead, and add the HNTrieContainer
references if and only if they are instanciated.
2019-05-01 18:54:11 -04:00
Raymond Hill a6816a52bb
Make Firefox dev build auto-update 2019-05-01 07:48:41 -04:00
Raymond Hill d295563e90
New revision for release candidate 2019-05-01 07:44:02 -04:00
Raymond Hill b87b242384
Use per-request secret rather than time-based secret
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/550
2019-05-01 07:41:04 -04:00
Raymond Hill 8f01bc7faf
Make Firefox dev build auto-update 2019-05-01 06:42:26 -04:00
Raymond Hill 5563f7fcc2
New revision for dev build 2019-05-01 06:38:23 -04:00
Raymond Hill 99212e3264
Code review: use function arrow properly 2019-05-01 06:35:47 -04:00
Raymond Hill 016625465e
Simplify a bit 9e43852 by using Array.every() 2019-04-30 16:18:40 -04:00
Raymond Hill 0714aceaaf
Simplify secret generation introduced in 9e4385243c 2019-04-30 15:19:10 -04:00
Raymond Hill e23cb71b1a
Make Firefox dev build auto-update 2019-04-30 14:56:26 -04:00
Raymond Hill 854b10eeae
New revision for dev build 2019-04-30 14:50:57 -04:00
Raymond Hill 9e4385243c
Web accessible secrets can be used for at most one second
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/550

Related Chromium issue (I can't access it):
- https://bugs.chromium.org/p/chromium/issues/detail?id=957866

Findings so far: affects browsers based on Chromium 74.
I could not reproduce the issue with either Chromium 73 or
Google Chrome 75.

This commit is a mitigation: to prevent sites from using
uBO's internal WAR secret for tracking purpose. A secret
can be used for at most one second, after which a new secret
is generated.

The original issue related to the implementation of
secret-gated web accessible resources is:
- https://github.com/gorhill/uBlock/issues/2823
2019-04-30 14:36:07 -04:00
Raymond Hill 2cc60fb6e8
Make Firefox dev build auto-update 2019-04-30 10:15:19 -04:00
Raymond Hill 35aea15785
New revision for dev build 2019-04-30 10:10:00 -04:00
Raymond Hill 0991a1138e
Add Energized Blu Go as stock multipurpose list
Link to project page:
https://github.com/AdroitAdorKhan/EnergizedProtection
2019-04-30 09:35:10 -04:00
Raymond Hill 73e2f25e95
Add new cosmetic procedural operator: `:nth-ancestor(n)`
The purpose of this new `:nth-ancestor(n)` operator is to
lookup the nth ancestor relative to the currently selected
node.

It is essentially equivalent to `:xpath(..)`, where
ancestor distance is expressed as a number rather than a
sequence of slash-separated `..`.

The rationale to introduce this new procedural selector
is to have a low overhead way to accomplish ancestor
selection.
2019-04-30 09:02:14 -04:00
Raymond Hill 42bf659695
Revert "Order HNTrie nodes alphabetically to allow for early bailout"
This reverts commit f5f9e05071.
2019-04-30 07:00:52 -04:00
Raymond Hill f5f9e05071
Order HNTrie nodes alphabetically to allow for early bailout
This commit implements the alphabetical ordering of HNTrie
nodes, so as to make it possible to bail out early at
HNTrie.matches() time.

Contrary to what I expected, there is no performance gain
observed to HNTrie.matches() as per benchmarks -- I find
the results perplexing.

Because of this I will revert this commit immediately.
The purpose of this commit is to record the changes so
that I can bring them back to life in the future whenever
I want to investigate further.
2019-04-30 06:47:54 -04:00
Raymond Hill a73024ad7b
Make Firefox dev build auto-update 2019-04-29 18:14:01 -04:00
Raymond Hill 391bf9e44e
New revision for dev build 2019-04-29 18:10:22 -04:00