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

11229 Commits

Author SHA1 Message Date
Raymond Hill
c7ddb2501b
Make Firefox dev build auto-update 2023-05-28 13:00:57 -04:00
Raymond Hill
252ea890ef
New revision for release candidate 2023-05-28 12:48:22 -04:00
Raymond Hill
fa9fdc0922
Import translation work from https://crowdin.com/project/ublock 2023-05-28 12:47:41 -04:00
Raymond Hill
695b93f970
Add support for world/dependencies to external scriplets
To let community better experiment with potential candidate scriptlets
for inclusion in uBO itself.
2023-05-28 12:42:47 -04:00
Raymond Hill
82eee10c3a
Logging-related changes 2023-05-28 10:37:23 -04:00
Raymond Hill
3c9e946107
Log error in dev console is logging is enabled 2023-05-27 19:05:02 -04:00
Raymond Hill
d776edf06b
Fix linter incorrectly reporting header= option
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/13thksi/filter_blocking_rule_based_on_post_methods_value/jlvhuoy/
2023-05-27 19:02:23 -04:00
Raymond Hill
45187077cf
Make Firefox dev build auto-update 2023-05-27 17:35:39 -04:00
Raymond Hill
83722829f4
New revision for dev build 2023-05-27 17:28:01 -04:00
Raymond Hill
8ed78cfb23
Support pruning by xpath in xml-prune scriptlet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18244
2023-05-27 17:26:19 -04:00
Raymond Hill
63273451c6
Make Firefox dev build auto-update 2023-05-27 09:25:44 -04:00
Raymond Hill
f1724c6deb
New revision for release candidate 2023-05-27 09:15:36 -04:00
Raymond Hill
d3fae27017
Add support for xhr in xml-prune
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18244
2023-05-27 09:14:19 -04:00
Raymond Hill
ea15cef524
[mv3] Also log salvaged rules using entity-based domains
Some filters with entity-based domain option can be salvaged
when there are non-entity-based domain option, but since we are
throwing away the entity-based entries, we are only partially
converting to DNR. This commit will log a warning about this
in log.txt. Before this commit, only non-salvageable filters
were logged.
2023-05-26 13:18:20 -04:00
Raymond Hill
86ba04dd68
Make Firefox dev build auto-update 2023-05-25 09:35:55 -04:00
Raymond Hill
475ed98e02
New revision for dev build 2023-05-25 09:18:49 -04:00
Raymond Hill
2bb446797a
Add remove-node-text.js scriptlet
The scriptlet remove the *whole* text of a DOM node. Usage:

    example.com##+js(remote-node-text, nodeName, condition, ...)

Where `condition` is a pattern to find in the target node for the
removal to occur. Since the text of the node is wholly removed,
this is not a scriplet which requires a trusted-source, as it is
virtually a similar capability as removing DOM nodes through
procedural cosmetic operator `:remove()` (which can't target
`#text` nodes), which does not require trusted-source.

Alias: `rmnt`

The extra parameters are the same as those documented for
`replace-node-text`.

For consistency, the alias for `replace-node-text` has been renamed
`rpnt`.
2023-05-25 08:51:26 -04:00
Raymond Hill
1ff31e0ccd
Expand "uBlock filters" by default 2023-05-24 20:12:28 -04:00
Raymond Hill
9c56e9ab29
Make Firefox dev build auto-update 2023-05-24 16:56:25 -04:00
Raymond Hill
7150c32023
New revision for release candidate 2023-05-24 16:51:52 -04:00
Raymond Hill
796ebc2444
Fix spoof-css for Firefox 2023-05-24 16:50:34 -04:00
Raymond Hill
005a0fe95d
Comment 2023-05-24 15:56:42 -04:00
Raymond Hill
9435cf6cfc
Make Firefox dev build auto-update 2023-05-24 15:45:47 -04:00
Raymond Hill
95a549c945
Import translation work from https://crowdin.com/project/ublock 2023-05-24 15:37:48 -04:00
Raymond Hill
3e082c44ca
Import translation work from https://crowdin.com/project/ublock 2023-05-24 15:36:04 -04:00
Raymond Hill
e33d948fdc
Minor code review 2023-05-24 15:33:46 -04:00
Raymond Hill
db7cadae49
Remove pointless code in spoof-css scriptlet 2023-05-24 15:26:57 -04:00
Raymond Hill
d4fb87b6ba
Properly return inherited methods in property getter in spoof-css scriptlet
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2618#issuecomment-1561451479
2023-05-24 14:58:12 -04:00
Raymond Hill
1d9ee00498
Simplify passing extra parameters in scriptlets
When scriptlets can receive extra optional paramaters, these will
now be passed as pair of extra paramaters in the filter declaration,
whereas each pair is a `name, value` instance.

As a result, the optional paramaters that can be passed to the
`aeld` scriptlet can be passed this way, i.e. no longer need
a JSON approach, example:

    github.com##+js(aeld, click, , log, 1)
    github.com##+js(aeld, , , runAt, idle, log, 1)

The non-optional paramaters are always positional, after which
the optional paramaters are non-positional pairs of values.
2023-05-24 11:59:17 -04:00
Raymond Hill
bc8bc6a4e6
Make Firefox dev build auto-update 2023-05-24 10:41:25 -04:00
Raymond Hill
7db6e5f053
New revision for dev build 2023-05-24 10:33:36 -04:00
Raymond Hill
8d1669f9b5
Ensure document.documentElement is present when executing acs scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2670
2023-05-24 10:32:03 -04:00
Raymond Hill
9878156820
Make Firefox dev build auto-update 2023-05-23 21:56:29 -04:00
Raymond Hill
9134c11cf8
Fix https://github.com/uBlockOrigin/uBlock-issues/issues/2668
Use document.append() only when there are no elements in
the DOM, as a document instance can't have more than one
direct child.
2023-05-23 21:49:42 -04:00
Raymond Hill
d5804dce7f
New revision for release candidate 2023-05-23 18:00:26 -04:00
Raymond Hill
879b837669
Fix scriptlet alias 2023-05-23 17:58:20 -04:00
Raymond Hill
21615160a7
Make Firefox dev build auto-update 2023-05-23 17:11:09 -04:00
Raymond Hill
d383c2f812
New revision for release candidate 2023-05-23 17:05:09 -04:00
Raymond Hill
842e356610
Put back missing scriptlet dependency
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2668

This broke `set-constant` filters.
2023-05-23 17:03:30 -04:00
Raymond Hill
f07fa40f16
Make Firefox dev build auto-update 2023-05-23 12:15:59 -04:00
Raymond Hill
6f06192982
New revision for dev build 2023-05-23 12:06:52 -04:00
Raymond Hill
c622298793
Minor CSS tuning 2023-05-23 12:06:19 -04:00
Raymond Hill
947d45be2f
Include imported lists in request to update
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2582#discussioncomment-5969939
2023-05-23 12:04:47 -04:00
Raymond Hill
19cdd50a1c
Add trusted-set-constant scriptlet
Alias: `trusted-set`

Behaves exactly like set-constant, except that any arbitrary JSON-
compatible value can be set.

By default the value is treated as a string, which can be anything.

If the value starts with `{` and ends with `}`, the value will be
JSON-parsed, and the `value` property of the resulting object will
be used.

As with any scriptlet requiring trust, filters using
`trusted-set-constant` can only come from trusted filter lists,
otherwise they are discarded.

Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/18185#discussioncomment-5977456
2023-05-23 10:59:27 -04:00
Raymond Hill
d74c73e452
Import translation work from https://crowdin.com/project/ublock 2023-05-23 09:28:36 -04:00
Raymond Hill
f18071fd26
Flags: w40 => h48, probably better for UHD displays 2023-05-23 09:24:30 -04:00
Raymond Hill
824f8b7ceb
Add comments for reviewers 2023-05-23 09:03:19 -04:00
Raymond Hill
e81439019f
Make Firefox dev build auto-update 2023-05-22 20:40:49 -04:00
Raymond Hill
296eabb498
New revision for dev build 2023-05-22 20:30:55 -04:00
Raymond Hill
1a863a877d
Support injecting scriptlet in MAIN or ISOLATED world
This reflects the _world_ of the MV3 scripting API:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/ExecutionWorld

MAIN: page's world
ISOLATED: extension's content script world

Some scriptlets are best executed in either world, so this
commit allows to pick in which world a scriptlet should execute
(default to MAIN).

For instance, the new sed.js scriptlet will now execute in
the ISOLATED world.
2023-05-22 20:19:00 -04:00