1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-09 12:22:33 +01:00
Commit Graph

999 Commits

Author SHA1 Message Date
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
Raymond Hill
8780ef2413
Remove no longer maintained KOR list
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/914
2020-02-28 08:10:42 -05:00
Raymond Hill
034c915f3b
Allow re-entrance in abort-current-inline-script
Related feedback:
- https://github.com/DandelionSprout/adfilt/issues/7#issuecomment-590391877

If a property is already trapped with a getter/setter,
propagate to these after validation succeed.
2020-02-24 13:40:17 -05:00
Saitama
84635ad38d
mvps list secure protocol http => https (#3769) 2020-02-23 06:57:03 -05:00
Raymond Hill
1a8571755e
Harden abort-current-inline-script scriplet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/6929
2020-02-09 10:35:18 -05:00
Raymond Hill
c7dc65fe33
Minor improvement to set-constant scriptlet
Disregard type matching for when the target property
is `null` or is set to `null`.
2020-01-21 10:57:55 -05:00
Raymond Hill
0ae1e9b1fe
Remove "uBlock filters -- Experimental" from stock lists
There is no point for such list since it's not possible
to get breakage measurements from using such list and
thus impossible to evaluate.

At the same time, "uBlock filters --- Annoyances" has
been moved to the "Annoyances" section.
2020-01-09 11:09:45 -05:00
Raymond Hill
3af362e258
Rename "Fanboy Cookie" to "EasyList Cookie" + update list link
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/804
2019-12-01 08:58:07 -05:00
Raymond Hill
8c6a08722f
Remove "RUS: AdGuard Russian" from stock filter list
As per feedback from maintainers, AdGuard Russian
and RU AdList are incompatible and web site breakage
can occur when both are used together.

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/749
2019-10-11 10:50:25 -04:00
Raymond Hill
9367a6015b
Convert new setTimeout-if scriptlet to blacklist approach
As per feedback from filter list maintainers, the
whitelist approach has been deemed to confusing.

The scriptlet has been renamed `no-setTimeout-if`
alias `nostif` to reflect the blacklist approach.

`setInterval-if` has been Similarly changed to
`no-setInterval-if` alias `nosiif`.
2019-09-15 11:01:50 -04:00
Raymond Hill
2fd86a66fc
Add json-prune.js scriptlet
The scriptlet will trap calls to JSON.parse, and
if the result of the parsing is an Object, it
will remove specified properties from the result
before returning to the caller.

Usage:

    ##+js(json-prune, arg1, [arg2])

Where:

- arg1: a list of space-separated properties to remove

- arg2: optional, a list of space-separated properties
        which must be all present for the pruning to
        occur

Example:

    ##+js(json-prune, enabled, adpath config)

A property in a list of properties can be a chain
of properties, example: adpath.url.first
2019-09-09 14:06:23 -04:00
Raymond Hill
35854e4baf
Use more descriptive name for raf-if.js
Related feedback:
- 6831967f5f (commitcomment-34979880)
2019-09-06 09:40:04 -04:00
Raymond Hill
e3043fadc7
Fix console logging ability in setTimeout-if
Regression from e0fd9750d4
2019-08-25 09:38:08 -04:00
Raymond Hill
e0fd9750d4
Further fix new setTimeout-if/setInterval-if scriptlets
Addtionally, a dedicated test page has been added:

https://gorhill.github.io/uBlock/tests/scriptlet-injection-filters-1.html
2019-08-25 09:03:24 -04:00
Raymond Hill
e0f0aedad6
Ability to negate delay in new setTimeout-if scriptlet
This also apply to setInterval-if. Thus to defuse
calls to setTimeout(fn, 1000), the filter could be:

    ##+js(stif, , !1000)

Meaning "allow setTimeout if the delay is not 1000".
2019-08-24 13:54:31 -04:00
Raymond Hill
c5536577b2
Add two scriptlets: setTimeout-if and setInterval-if
Usage is similar to that of raf-if introduced in
commit 6831967f5f.

The two new scriptlets are meant to replace:
- setTimeout-defuser
- setTimeout-logger
- setInterval-defuser
- setInterval-logger

setTimeout-logger and setInterval-logger have been
removed, since they are not to be used in production.

To log setTimeout and setInterval usage, respectively
(using aliases):
- ##+js(stif)
- ##+js(siif)

To defuse setTimeout unconditionally:
- ##+js(stif, !)

Usage of setTimeout-defuser and setInterval-defuser
is deprecated and will be removed in some future when
they are no longer in use.

Keep in mind that the new scriptlets function on a
whitelist basis, whereas the deprecated ones
function on a blacklist basis. Prefixing the needle
with `!` allow to use the new scriptlets on a
blacklist basis.
2019-08-22 09:32:46 -04:00
Raymond Hill
252ce421c9
Fix raf-if scriptlet: bad Proxy target
It was working nonetheless, which made me
miss the mistake.
2019-08-21 10:36:08 -04:00
Raymond Hill
6831967f5f
Add new scriptlet to defuse calls to requestAnimationFrame
Scriptlet name: `raf-if.js`

Usage: `example.com##+js(raf-if, !/(\d+){4}/)`

Argument: one single argument, which is the "needle" to
find in the stringified argument passed to
requestAnimationFrame.

requestAnimationFrame will be defused when:

- The needle is not prefixed with `!` and the needle
  does not match the stringified argument; OR
- The needle is prefixed with `!` and the needle
  matches the stringified argument.

The `raf-if.js` scriptlet will log calls to
requestAnimationFrame to the console when no parameter
is provided, i.e.:

    example.com##+js(raf-if)

Otherwise no logging occurs.
2019-08-21 10:13:23 -04:00
Raymond Hill
3d66bdc8e9
Add shorthand alias for set-constant.js: set.js 2019-07-29 10:16:36 -04:00
Raymond Hill
a89aad0304
Remove trailing spaces
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/679
2019-07-22 07:32:39 -04:00
Raymond Hill
ce644c5960
Remove code unused in next release
Since https://github.com/uBlockOrigin/uBlock-issues/issues/156
won't be fixed in next release, no need to ship
with code which will be unused, and anyways only once
the fix is worked on will it be clear exactly what needs
to be used by scriptlets to deal harmoniously with
property listener collisions.
2019-07-11 10:17:06 -04:00
Raymond Hill
c499ce82a9
Use Reflect.construct(t) rather than new t()
Using `new` seemed to work but it's maybe
semantically better to use `Reflect.construct`.
2019-07-11 09:45:53 -04:00
Raymond Hill
9a95fbff94
Restore erroneously remove comments in migration 2019-07-10 08:11:51 -04:00
Raymond Hill
e55cae6232
Fine tune new resources-related code
Make sure the parser is safely compatible with old
resources format -- for those users still using
custom resources (via `userResourcesLocation`).

Prepare code for future fix to
<https://github.com/uBlockOrigin/uBlock-issues/issues/156>:

This commit introduces a new private Map() object,
`uBOSafe`, accessible by all injected scriptlets. This
private safe can be used to store data which can be shared
with different scriptlets. The idea is for scriptlets to
use that safe to graciously deal with the need to install
multiple listeners for the same property.
2019-07-08 08:56:36 -04:00
Raymond Hill
4c201c90e1
Remove strat mime type in scriptlets.js
Related ffedback:
- 6f5aa947fb (commitcomment-34205920)
2019-07-06 13:53:36 -04:00
Raymond Hill
6f5aa947fb
Finalize converting resources.txt into immutable resources
With hindsight, I revised decisions made earlier during
this development cycle:

Un-redirectable scriptlets have been removed from
/web_accessible_resources and instead put in the new
/assets/resources/scriptlets.js, which contains all
scriptlets used for web page injection purpose.

uBO will no longer fetch a remote version of built-in
resources.

Advanced setting `userResourcesLocation` will still be
honoured by uBO, and if set, will be fetched every
time at least one asset is updated.
2019-07-06 12:36:28 -04:00
Raymond Hill
7904bebffb
Removed seemingly abandoned "DNK: Schacks" list
Related discussion:
- https://github.com/DandelionSprout/adfilt/issues/7#issuecomment-496691761
2019-05-28 18:12:49 -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
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
93efba2014
Fix https://github.com/NanoMeow/QuickReports/issues/1091 2019-04-27 15:50:19 -04:00
Raymond Hill
c9b55d48e3
Fix https://github.com/uBlockOrigin/uBlock-issues/issues/531 2019-04-17 07:41:49 -04:00
Raymond Hill
53860c3ad2
Forgot to add lij re. https://github.com/uBlockOrigin/uBlock-issues/issues/501 2019-04-14 18:30:57 -04:00
Raymond Hill
c9c21f9cbf
Add more languages for list selection at install/reset time
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/501

Also, the handling of 3-letter language codes has been fixed.
2019-04-14 18:20:57 -04:00
okiehsch
98182c12a8 adress https://github.com/DandelionSprout/adfilt/issues/7#issuecomment-478296690 (#3754) 2019-03-30 23:22:50 -03:00
Raymond Hill
e4f3559db1
Remove JPN-0 from stock lists
As per feedback, for example:
- https://www.reddit.com/r/uBlockOrigin/comments/apby98/
2019-02-12 10:23:48 -05:00
Raymond Hill
3e41939e41
Add "AdGuard Social Media filter" to stock lists
Related issue:
- https://github.com/gorhill/uBlock/issues/3214
2019-01-11 09:39:37 -05:00
Raymond Hill
4e54c47253
Remove not really needed URLs 2019-01-08 08:00:10 -05:00
gwarser
0f8f999f99 New Polish anti-adblock list (#3747)
* New Polish anti-adblock list

* We already had POL-1

Removed in February 2018
2018-12-08 12:53:40 -05:00
Raymond Hill
5a7280c46e
fix https://github.com/uBlockOrigin/uBlock-issues/issues/311 2018-12-06 09:00:59 -05:00
Raymond Hill
eaa5b4f517
fix https://github.com/uBlockOrigin/uBlock-issues/issues/312 2018-12-06 08:57:24 -05:00
okiehsch
a8a0d1d407 edit some filterlist titles (#3744) 2018-11-25 12:15:07 -05:00
ZaphodBeebblebrox
8d6bb24fc3 Add Finnish filter list (#3743)
* Add new Finnish filter list

* Correct ordering of lists.

* Correct spacing
2018-11-14 10:49:04 -02:00
Raymond Hill
c6025e6643
fix https://github.com/uBlockOrigin/uBlock-issues/issues/285 2018-10-24 08:49:57 -03:00
gwarser
4a442eece4 Update Spam404 URL (#3740) 2018-10-22 18:43:51 -03:00
Hugo Xu
1e549537ea Update assets.json (#3739) 2018-10-19 11:53:18 -03:00
Babak Farrokhi
bd320d4572 Moving to GitCDN due to forthcoming sunset of rawgit.com (#3738) 2018-10-17 11:59:30 -03:00
Raymond Hill
f38df80959
fix https://github.com/uBlockOrigin/uBlock-issues/issues/197#issuecomment-426960842 2018-10-04 06:35:50 -04:00
Raymond Hill
7ab0d94f92
fix https://github.com/uBlockOrigin/uBlock-issues/issues/197 2018-09-05 07:23:58 -04:00
Raymond Hill
bae93f290e
address https://github.com/uBlockOrigin/uBlock-issues/issues/193 2018-09-02 06:34:17 -04:00
Raymond Hill
27dc7ba6f8
adjust title to that of "Title" directive 2018-08-14 12:34:31 -04:00
Raymond Hill
36774c9c7f
fix https://github.com/uBlockOrigin/uBlock-issues/issues/166 2018-08-14 12:29:59 -04:00
Hugo Xu
7c4146d8ba Update assets.json (#3725) 2018-05-30 14:07:19 -04:00
Raymond Hill
21d7dda6b4
fix https://github.com/uBlockOrigin/uBlock-issues/issues/41 2018-05-15 07:12:13 -04:00
Martin Vobruba
26979d89bd Change URL for CZ/SK filters (#3719)
See tomasko126/easylistczechandslovak#138
2018-04-23 16:23:05 -04:00
Raymond Hill
bb0e3264de
remove unused file 2018-04-15 06:53:17 -04:00
Raymond Hill
4ec386de98
Switch abpnv.com to HTTPS (#3664) 2018-04-10 08:44:38 -04:00
Raymond Hill
5729950779
remove redundant list: https://github.com/gorhill/uBlock/issues/3147#issuecomment-378829539 2018-04-05 06:01:46 -04:00
Raymond Hill
51bae66785
fix #3603 2018-03-14 07:29:58 -04:00
Raymond Hill
64682ab8a1
convert spaces to tabs 2018-02-26 13:58:29 -05:00
Raymond Hill
010edeb069
fix #3547 2018-02-25 13:53:20 -05:00
Raymond Hill
ccfbdc614e
remove now redundant POL filter list 2018-02-20 07:07:16 -05:00
Raymond Hill
c0f25d112a
fix https://github.com/uBlockOrigin/uAssets/issues/1546 2018-02-15 07:48:39 -05:00
Raymond Hill
b0600645a6
add instruction URL to POL filter list 2018-02-08 08:15:22 -05:00
Babak Farrokhi
32bde274b9 Use rawgit.com to download filter list (#3438)
- (githubusercontent.com cannot be accessed from iran
2018-01-15 08:24:43 -05:00
Raymond Hill
367001a3de
address https://github.com/uBlockOrigin/uAssets/issues/1026 2017-12-17 09:37:10 -05:00
Raymond Hill
46d446ec92
fix https://github.com/uBlockOrigin/uAssets/issues/999 2017-12-14 18:28:14 -05:00
Martin Vobruba
23065a8b90 Change URL for CZ/SK filters and add "sk" lang (#3312)
We've introduced a new set of filters for uBlock because some uBlock
specific rules are breaking ABP and we will remove them from the
filters.txt file.
2017-12-03 08:22:10 -05:00