1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-06 19:02:30 +01:00
Commit Graph

965 Commits

Author SHA1 Message Date
Raymond Hill
bf7ce857ee
Update URL of HUN filter list
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1364
2020-11-27 11:36:50 -05:00
Raymond Hill
13f92756be
Make json-prune scriptlet also trap Response.json() calls
Related discussion:
- https://www.reddit.com/r/uBlockOrigin/comments/jns1t4/white_screen_skip_ad_on_youtube/gbg4aq8/
2020-11-08 08:45:33 -05:00
Raymond Hill
fe2c4a4914
Use secure.fanboy.co.nz instead of fanboy.co.nz
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/8166
2020-11-06 06:22:34 -05:00
Raymond Hill
d037d9dced
Update Fanboy URLs
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/8166
2020-11-06 06:17:37 -05:00
Raymond Hill
5de0ce9757
Improve fix for set-constant conflict
Related commit:
- 2546f39568
2020-10-20 05:23:10 -04:00
Raymond Hill
2546f39568
Avoid trapping already trapped properties
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/156#issuecomment-712249945

When the client code assigned a variable to itself, this
would cause the scriptlet to try to re-trap already
trapped properties.
2020-10-19 12:01:55 -04:00
Raymond Hill
a08f33e09d
Prevent only target (leaf) property from being overtaken
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/156#issuecomment-707095193

Related commit:
- 6e010ecc0f
2020-10-12 11:00:30 -04:00
Raymond Hill
6e010ecc0f
Prevent set-constant properties from being overtaken
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/156#issuecomment-707095193

Additionally, while investigating the issue I removed
code which is no longer needed since content scripts
are now injected in `about:blank` frames since 1.29.0.
2020-10-12 10:08:51 -04:00
Raymond Hill
11b9f88b38
Update urlhaus-filter URL
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1285
2020-10-08 07:25:15 -04:00
pixeltris
75c58ec7af
Update for twitch.tv #5184 (#3781) 2020-10-02 12:20:30 -04:00
Raymond Hill
3693755e94
Add fall back URL for manual update of urlhaus-filter
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/j1ehm5/
2020-09-28 16:31:44 -04:00
Raymond Hill
793e2c7896
Further fine tune new aost scriptlet 2020-09-23 09:41:00 -04:00
Raymond Hill
365b3f7f83
Changes to abort-on-stack-trace as per road testing
Related commit:
- https://github.com/gorhill/uBlock/commit/b735ac6b6aba
2020-09-23 06:54:44 -04:00
Raymond Hill
1e91fb8733
Fine tune regex used to detect inline script contexts
Related commit:
- b735ac6b6a
2020-09-22 11:18:12 -04:00
Raymond Hill
b735ac6b6a
Add abort-on-stack-trace scriptlet
This new scriplet has become necessary as a
countermeasure to new bypass mechanisms by
some websites, as discussed with filter list
maintainers.

Also related discussion:
https://github.com/AdguardTeam/Scriptlets/issues/82

Scriptlet: abort-on-stack-trace

Alias: aost

Argument 1:
  The property to trap in order to launch the
  stack trace matching code, ex. Math.random

Argument 2:
  The string (needle) to match against the stack
  trace. If the empty string, always match. There
  is a special string which can be used to match
  inline script context, <inline-script>.

Argument 3:
Whether to log, and if so how:
  Empty string: do not log
  1: log stack trace for all access to trapped
     property
  2: log stack trace for defused access to trapped
     property
  3: log stack trace for non-defused access to
     trapped property
2020-09-22 09:59:04 -04:00
Raymond Hill
953ba1231f
Object.values() may fail for unknown reasons
Work around this issue by using more reliable
Object.keys().
2020-09-11 08:30:11 -04:00
Raymond Hill
23f08f0274
Add support for blocklist of filter lists
Many filter lists are known to cause serious filtering
issues in uBO and are not meant to be used in uBO.

Unfortunately, unwitting users keep importing these
filter lists and as a result this ends up causing
filtering issues for which the resolution is always
to remove the incompatible filter list.

Example of inconpatible filter lists:
- Reek's Anti-Adblock Killer
- AdBlock Warning Removal List
- ABP anti-circumvention filter list

uBO will use the following resource to know
which filter lists are incompatible:
- https://github.com/uBlockOrigin/uAssets/blob/master/filters/badlists.txt

Incompatible filter lists can still be imported into
uBO, useful for asset-viewing purpose, but their content
will be discarded at compile time.
2020-08-21 11:57:20 -04:00
Raymond Hill
8275690e93
Fix https://github.com/uBlockOrigin/uAssets/issues/5696#issuecomment-675757755 2020-08-20 09:53:11 -04:00
Raymond Hill
bf01fc737d
urlhaus blocklist CDNs: remove githack, add github, gitlab 2020-07-20 12:52:41 -04:00
Raymond Hill
c33de41660
Support multiple trappers to same property in set-constant
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/156
- https://github.com/uBlockOrigin/uBlock-issues/issues/1162

Take into account that a trapped property may have been
already trapped, and if so honour previous trapper
getter/setter.
2020-07-19 08:16:40 -04:00
Raymond Hill
321eae7417
Remove stray empty line 2020-07-16 16:39:07 -04:00
Raymond Hill
3aed2497a3
Use AdGuard French as in-place replacement of Liste FR
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/379

Related recent discussion:
- 529643bdce
2020-07-16 16:29:24 -04:00
Raymond Hill
975d894419
Stringify argument using implicit rather than explicit conversion
Reported internally by team.

Explicit conversion was causing an exception to be
thrown when the type argument was not supporting
`toString()`, for example when `type` argument was
literal `null`.
2020-07-16 09:55:06 -04:00
Raymond Hill
947651427d
Use tabs instead of whitespaces 2020-07-15 16:06:39 -04:00
Raymond Hill
dacf83b5c0
Add cdn.jsdelivr.net mirror for urlhaus blocklist 2020-07-13 15:50:13 -04:00
Raymond Hill
d93f32e882
Remove repo.or.cz from list of CDNs for urlhaus blocklist
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1152
2020-07-13 15:34:07 -04:00
Raymond Hill
4197defe6e
Remove reference to no longer used resources.txt 2020-07-08 10:51:26 -04:00
Raymond Hill
4c89c16401
Fix cdn.statically.io-based URL for urlhaus lists
Related feedback:
- a13ac92089 (commitcomment-40399574)
2020-07-06 11:06:59 -04:00
Raymond Hill
46e205d61a
Fix incorrect list name for newly added urlhaus list 2020-07-06 09:43:44 -04:00
Raymond Hill
a13ac92089
Replace seemingly abandoned malware lists with urlhaus list
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1116
- https://github.com/uBlockOrigin/uBlock-issues/issues/984

It has been found that the two malware lists uBO uses by
default appear to be essentially no longer maintained.

urlhaus list[1] has been identified by the community as
being well maintained and as being actually useful as a
default malware-related list in uBO, since it's being updated
every day from a database of top domains and specific URLs
identified as serving malicious content. Additionally, the
maintainer of urlhaus list has taken steps to increase
compatibility with uBO[2].

The decision has been to replace the current two malware-
related lists with urlhaus list, which will be enabled by
default in uBO -- and this means that list will be part of
uBO's package from now on.

For those who have the two removed malware lists enabled,
these will be moved to the custom lists section -- they
will still be enabled. It is suggested users remove them from
their selection of lists as their usefulness at this point
is questionable.

[1] https://gitlab.com/curben/urlhaus-filter
[2] 859dfd03c6
2020-07-06 09:03:20 -04:00
Raymond Hill
8f3d8cde7a
Add support to compare delay against literal Number.NaN in nossif/nostif
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1136
2020-07-02 11:47:49 -04:00
Raymond Hill
f433932d86
Add support for wildcard/array in json-prune
Add support for specially-named properties:

`[]`, to iterate through all elements in an array, in
order to deal more graciously with cases where the
property to remove is an element in an array. An
actual case:

    +js(json-prune, playlist.movies.0.adserver playlist.movies.1.adserver ...)

Can be now converted to:

    +js(json-prune, playlist.movies.[].adserver)

`*`, to iterate through all own properties of an object,
in order to deal with random-named properties. For
example (not an actual case):

    +js(json-prune, playlist.*.adserver)

Where `adserver` would be a property member of an
object which is itself a property of `playlist`, but
which name is unknown or is variable.
2020-06-26 10:03:48 -04:00
Raymond Hill
c4d39d3763
Fix cookie removal on subdomains of base domain
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1126
2020-06-24 17:18:14 -04:00
Raymond Hill
89fcdc6a11
Update URL for EasyList Lithuania
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1106
2020-06-10 16:28:31 -04:00
Raymond Hill
faffb63234
easylist.to server is fixed, revert a79e0c8f40 2020-05-26 08:14:08 -04:00
Raymond Hill
a79e0c8f40
Use secure.fanboy.co.nz/easylist.txt for the time being
Related discussion:
- https://twitter.com/gorhill/status/1264689513475039232
2020-05-25 07:32:02 -04:00
Raymond Hill
5227013a8e
Add uBO: prefix to logged output in some scriptlets
As per request.
2020-04-28 11:19:26 -04:00
Raymond Hill
578594bbd7
Improve logging capabilities of json-prune scriptlet
Specifically:

- Log entries as received by client code
- Prettier and more readable console output
- Ability to only log entries matching a
  specific needle

As per internal discussion at
<https://github.com/uBlockOrigin/uAssets>; limited
logging capabilities of json-prune originally raised
by <https://github.com/gwarser>.
2020-04-28 09:47:03 -04:00
Raymond Hill
a733944624
Add statically.io as CDN provider
As of commit time, the provider caches resources
for at most 24 hours.
2020-04-26 09:59:51 -04:00
Raymond Hill
d95b27915f
Bring fingerprint2.js scriptlet up to date
Related issue:
- https://github.com/uBlockOrigin/uAssets/pull/4961
2020-04-18 09:45:07 -04:00
Raymond Hill
08be3a0558
Add CDN URLs for "uBlock filters -- Unbreak" 2020-04-16 09:03:29 -04:00
Raymond Hill
1de0e820b8
Replace requestAnimationFrame-if.js with no-requestAnimationFrame-if.js
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/981

To be consistent with no-setTimeout-if.js.

requestAnimationFrame-if.js is deprecated and must no longer be
used, it will be removed in the near future when it's no longer
in use in default filter lists.

no-requestAnimationFrame-if.js is aliased to norafif.js.
2020-04-15 10:06:53 -04:00
Raymond Hill
bf2d38ccf3
Add CDN URLS for ublock-filters
Related commit:
- 4687c60bf9
2020-04-08 10:12:50 -04:00
Raymond Hill
34a2ef6c42
Remove Disconnect Malvertising from stock filter lists
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/973

The list appears no longer maintained and has seen mostly
only removed entries over years.
2020-04-05 08:24:05 -04:00
Raymond Hill
81413b4076
Remove hpHosts from stock filter lists
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/971
2020-04-01 07:41:52 -04:00
Raymond Hill
49d9929191
Add remove-class scriptlet (alias: rc)
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/935

Arguments are similar to that of remove-attr
scriptlet.
2020-03-18 09:44:18 -04:00
Raymond Hill
8b69af0dda
Remove "Adblock Warning Removal​" from stock filter lists
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/951
​​​​​
2020-03-18 09:02:22 -04:00
Raymond Hill
85cf8f5807
Fix last commit re. set-constant scriptlet
Related commit:
- https://github.com/gorhill/uBlock/commit/40ea9d69d5d0

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/947

Restore intended behavior with original commit:
- https://github.com/gorhill/uBlock/commit/14ebfbea279c

The purpose of the original change was to be able to
trap properties which values were `null`.
2020-03-16 09:09:48 -04:00
Raymond Hill
40ea9d69d5
Fix regression in set-constant scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/947

`Object.prototype` is not an instance of `Object`, but
yet is still a JS object; thus the solution is to
additionally compare against `typeof`.
2020-03-16 08:47:34 -04:00
Raymond Hill
14ebfbea27
Improve set-constant.js scriptlet
The scriptlet will now still try to trap a specific
property if a segment of the chain is not undefined
while yet not an object either.

For example, this now allows to set a value on
`document.body.onselectstart` when `document.body` has
not been instantiated yet by the browser parser,
whereas this would previously fail because
`document.body` would be `null` while the scriptlet
was testing against `undefined`.
2020-03-07 14:16:54 -05:00