1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 10:22:30 +01:00
Commit Graph

1002 Commits

Author SHA1 Message Date
Raymond Hill
5dd91211ae
Catch exceptions thrown Object.defineProperty
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/9883

Related commit:
- a9e6f9c72c
2021-09-01 18:25:20 -04:00
Raymond Hill
a9e6f9c72c
Assign value in set-constant regardless of configurable property
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1694
2021-08-27 10:48:49 -04:00
Raymond Hill
a21ecafbc6
Improve reliability of set-constant scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1694
2021-08-25 10:48:50 -04:00
Raymond Hill
4fe8126c66
Add ability to match against script content of data: URI
Related commit:
- ebc42ae21e
2021-07-18 08:50:57 -04:00
Raymond Hill
f07b1475a3
Fix hasty last commit 2021-07-17 14:27:37 -04:00
Raymond Hill
ebc42ae21e
Add abort-current-script scriptlet
This scriplet supersedes abort-current-inline-script (acis),
and accepts an optional third argument which is matched
against the `src` property of script resources.

When the third argument is not provided, the scriptlet
behaves essentially the same as `acis`, and because of
this `acis` is now aliased to `abort-current-script`, and
all existing `acis` filters will execute with no change
in behavior.

In the long run, usage of `abort-current-inline-script` or
its alias `acis` should go away and be replaced with
`abort-current-script` or its alias `acs`.
2021-07-17 14:03:50 -04:00
Raymond Hill
0952dd52c6
Add "Block access to LAN" as stock list
Enabling the list did NOT cause measurable difference in
results of built in benchmark.
2021-07-06 10:01:26 -04:00
Raymond Hill
c91b4258e9
Put back mistakenly removed newline 2021-07-03 09:23:06 -04:00
Raymond Hill
35d7406214
Add asap behavior to remove-attr scriptlet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/9528
2021-07-03 09:19:24 -04:00
Raymond Hill
2a8c85b132
Add "AdGuard URL Tracking" list as stock lists (under "Privacy") 2021-06-25 07:09:22 -04:00
Raymond Hill
2de24a1184
Add ability to linger for remove-class scriptlet
Similar to related change for the `remove-attr` scriptlet:
- 0f330c7359

Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/nsroaw/some_elements_isare_not_removed_after_the_cookie/
2021-06-06 08:58:40 -04:00
Hoàng Rio
c16f080cc7
Update ABPVN List url to uBO specific support 2021-06-05 11:01:48 +07:00
Raymond Hill
ce801b952b
Add empty array, object to set-constant scriptlet 2021-05-28 07:09:30 -04:00
Raymond Hill
07d3c96261
Fix potential exception when casting to string
Related discussion:
- https://github.com/uBlockOrigin/uAssets/issues/9123#issuecomment-848255120
2021-05-26 07:22:17 -04:00
Raymond Hill
4509df154f
Lower update period of assets.json and add support for CDN urls 2021-05-18 09:21:09 -04:00
Raymond Hill
e4b8f2ef2d
Ensure getter/setter are called with proper context
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/9110
2021-05-18 09:01:40 -04:00
Raymond Hill
9e394aa02b
Restore "EasyList Dutch" as the default list for NLD
Breach of trust:
- f73cefaf13
2021-05-18 08:37:33 -04:00
Raymond Hill
55c6f768d4
Fix https://github.com/uBlockOrigin/uAssets/issues/9122 2021-05-18 07:15:00 -04:00
Raymond Hill
7ca831a344
Bring back cdn.statically.io as valid CDN for "uBlock filters"
Related commit:
- aa376314b9
2021-05-13 08:49:57 -04:00
Raymond Hill
4d12ae1387
Add new CDN for "uBlock filters"
As per internal discussion.
2021-04-28 14:02:49 -04:00
Raymond Hill
aa376314b9
Drop cdn.statically.io as CDN for "uBlock filters"
Some sublists fail to load with this CDN, and
uBO fails to properly error out on the whole
list in such case, causing a truncated whole
list to be used in the end.
2021-04-28 13:32:12 -04:00
Raymond Hill
2a5e67e3f5
Use CDN URLs as fall back URLs
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1566#issuecomment-826473517

Additionally, add more CDN URLs to default filter lists.
2021-04-27 08:56:07 -04:00
Raymond Hill
1fc3b57ba5
Replace EasyList Dutch with EasyDutch
As per internal discussion with list maintainers.

Also, related discussion:
- 31a6438704
2021-04-21 09:12:47 -04:00
Raymond Hill
bfdc81e9e4
Ensure FLoC is opt-in by default
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1553

This commit ensures FLoC is opt-in. The generic filter
`*##+js(no-floc)` in "uBlock filters -- Privacy" ensures
the feature is disabled when using default settings/lists.

Users can opt-in to FLoC by adding a generic exception
filter to their custom filters, `#@#+js(no-floc)`; or they
can opt-in only for a specific set of websites through a
more specific exception filter:

    example.com,shopping.example#@#+js(no-floc)
2021-04-11 09:36:56 -04:00
Raymond Hill
5a48917b80
Add no-floc scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1553
2021-04-11 07:11:09 -04:00
Raymond Hill
d338e4c4b6
Add support for "remove all properties" in json-prune scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1545
2021-04-06 10:12:34 -04:00
Raymond Hill
97619cf8f5
Revert "Use gitcdn.link instead of gitcdn.xyz"
This reverts commit 60b9aa2f38.

Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/megq9g/
2021-03-27 12:19:34 -04:00
Raymond Hill
60b9aa2f38
Use gitcdn.link instead of gitcdn.xyz
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1533
2021-03-21 08:17:33 -04:00
Raymond Hill
634724cf29
Add fallback URLs for "IRN: Adblock-Iran"
Main URL is currently failing. Reported internally.
2021-03-20 07:41:24 -04:00
Raymond Hill
4320e9c28b
Removing Fanboy Enhanced Tracking
Too likely to cause breakage. It was originally added without
having been really evaluated. As per feedback, it's too likely
to cause breakage.

The list is seemingly used to evaluate filters, which are moved
to EasyPrivacy once they are deemed valid and useful.
2021-03-06 10:25:36 -05:00
Raymond Hill
de1ed2c519
Replace "EasyList China" with "AdGuard Chinese"
As discussed internally with list maintainers:

- EasyList China doesn't leverage uBO's extended
  filter syntax

- EasyList China's home page is no longer available
  to the public

Additionally, "CJX's EasyList Lite" has been removed
from stock lists, as the list hosted on GitHub is no
longer updated, and "AdGuard Chinese" is the official
list to enable to address all filter issues for
Chinese sites.
2021-02-02 08:30:02 -05:00
Raymond Hill
001f5a6500
Add any-delay to timeout/interval boosters
Using `*` as delay argument will match any
delay.

As per internal feedback from filter list
maintainers.
2021-01-23 09:45:44 -05:00
Raymond Hill
5fa873960f
Listen to load events on window, not document
Related feedback:
- 0f330c7359 (r45774155)
2021-01-08 13:11:09 -05:00
Raymond Hill
0f330c7359
Add ability to linger for remove-attr scriplet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1445

A third (optional) argument has been added to `remove-attr`
scriptlet, which can be one or more space-separated tokens
dictating the behavior of the scriptlet:

`stay`: This tells the scriplet to stay and act on DOM
changes, whiĺe the default behavior is to act only once
when the document becomes interactive.

`complete`: This tells the scriplet to start acting only
when the document is complete, i.e. once all secondary
resources have been loaded, while the default is to start
acting when the document is interactive -- which is earlier
than when the document is complete.

Example:

    ...##+js(remove-attr, class, .j-mini-player, stay)
2021-01-08 10:45:35 -05:00
Raymond Hill
ab06a01062
Better handle Request argument in no-fetch-if
As per internal feedback.
2020-12-24 08:26:30 -05:00
Raymond Hill
b6ed83bc5c
Add logging ability to new scriptlet no-fetch-if
When no-fetch-if scriptlet is used without argument, the
parameters passed to no-fetch-if will be output to the
console, as `uBO: fetch([...list of arguments...])`.
2020-12-11 09:28:29 -05:00
Raymond Hill
ba11a70013
Add new scriptlet: no-fetch-if
The new scriptlet allows to defuse calls to fetch() by returning
a promise which always resolve to an empty response.

There is only one argument, which is a space-separated list
of conditions which must be ALL fulfilled in order for the
defusing to take place.

Each condition is a pair of property name and property value
separated by a column. Valid property names are those
documented as valid `init` options:

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch

The URL of the fetch() is a special case and does not have to
be associated with a property name. Example of usage:

  ...##+js(no-fetch-if, method:HEAD)

Which means: defuse the call to fetch() if there is an
explicit option which contains `HEAD`. Another example:

  ...##+js(no-fetch-if, adsbygoogle.js)

Which means: defuse the call to fetch() if the URL contains
`adsbygoogle.js`. Multiple conditions can be provided:

  ...##+js(no-fetch-if, adsbygoogle.js method:HEAD)

If at least one condition does not match, the defusing will
not take place.

The string against which to match can be a literal regular
expression:

  ...##+js(no-fetch-if, /adsbygoogle.js$/ method:/HEAD|POST/)

Additonally, the following deprecated scriplets have been
removed:

- requestAnimationFrame-if.js
- setInterval-defuser.js
- setTimeout-logger.js
2020-12-11 08:29:23 -05:00
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