1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00
Commit Graph

1012 Commits

Author SHA1 Message Date
Raymond Hill
3f47172473
Update Twitch scriptlet
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1789#issuecomment-959831926

Related commit:
- 7233b5fd22
2021-11-04 09:24:31 -04:00
Raymond Hill
9f693c75c7
Remove Spam-404, add curben's Phishing and PUP lists
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1766
2021-10-16 12:36:32 -04:00
Raymond Hill
d7d38449ea
Add official mirrors for Nordic Filters and EasyList Lithuania (issue #1566) (#3859)
* Fix https://github.com/uBlockOrigin/uBlock-issues/issues/1566

* Update assets.json

* Removed two cdnURLs duplicates

As per https://github.com/uBlockOrigin/uBlock-issues/issues/1566#issuecomment-944922005

Co-authored-by: Imre Kristoffer Eilertsen <imreeil42@gmail.com>
2021-10-16 10:50:16 -04:00
pixeltris
cc0008df57
Fix broken twitch.tv functionality (#3858)
* Fix broken twitch.tv functionality

Fixes some features of twitch.tv which are broken due to device id change on every gql request.

Related issues:
- https://github.com/pixeltris/TwitchAdSolutions/issues/50
- https://github.com/pixeltris/TwitchAdSolutions/issues/45

* Use strict equality
2021-10-14 10:03:25 -04:00
Raymond Hill
aceaea0122
Minor code review 2021-10-14 09:22:36 -04:00
Eli Grey
1285f78e05
Don't assume document.documentElement is non-null (#3857)
* Fix uBlockOrigin/uBlock-issues#1756

This PR fixes uBlockOrigin/uBlock-issues#1756.

* fix dom-inspector.js

* more explicit if statements

* these changes should also be safe
2021-10-14 09:08:08 -04:00
Raymond Hill
0d3a1932e9
Update twitch-videoad scriptlet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/5184#issuecomment-938379331

Solution contributed by <https://github.com/pixeltris>:
- 6be4c53130
2021-10-08 07:12:58 -04:00
Raymond Hill
c0a43b0d32
Add refresh-defuser scriptlet
To specifically defuse the reloading of a document through
a meta "refresh" tag.

Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/q0frv0/

As per solution from AdGuard:
- https://www.reddit.com/r/uBlockOrigin/comments/q0frv0/while_reading_a_sports_article_i_was_redirected/hf7wo9v/
2021-10-03 09:46:24 -04:00
Raymond Hill
33a18c3a1e
Convert fingerprint2.js scriptlet into a redirectable resource
As per internal discussion with volunteer filter list
maintainers.
2021-09-18 10:55:22 -04:00
Raymond Hill
745fbd1c02
Add no-xhr-if scriptlet
As per request from filter list maintainers.
2021-09-11 09:15:39 -04:00
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