Commit Graph

11227 Commits

Author SHA1 Message Date
Raymond Hill 1f9ecffbd1
New revision for dev build 2023-03-30 17:14:09 -04:00
Raymond Hill 0b09155268
Clear unprocessed requests status on webNavigation reload event
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2564
2023-03-30 17:12:45 -04:00
Raymond Hill a6071565a5
Import translation work from https://crowdin.com/project/ublock 2023-03-30 16:35:52 -04:00
Raymond Hill 0a899e1279
Added strings to translate 2023-03-30 16:33:32 -04:00
Raymond Hill c3df4ced0a
Import translation work from https://crowdin.com/project/ublock 2023-03-30 16:32:24 -04:00
Raymond Hill 65e2f37585
Make Firefox dev build auto-update 2023-03-30 13:31:28 -04:00
Raymond Hill 0b6e25abb4
New revision for dev build 2023-03-30 13:26:48 -04:00
Raymond Hill d58309674d
Enfore implicit `media` type for filters using `mp4`
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2568
2023-03-30 13:25:45 -04:00
Raymond Hill b68a7dbad4
Make Firefox dev build auto-update 2023-03-30 13:05:59 -04:00
Raymond Hill a9239f93b6
New revision for dev build 2023-03-30 12:59:27 -04:00
Raymond Hill 42a00ec742
Better detect invalid network filter patterns
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2566
2023-03-30 12:58:19 -04:00
Raymond Hill 1835e90125
Avoid using `!` toolbar icon badge when inconsequential
uBO will now verify that at least one unprocessed network requests
at launch should have been blocked in order to warn users of
unprocessed network requests through the `!` toolbar icon badge.

For example, with default filter lists, there is nothing to block
on `wikipedia.org`, and hence in this case it's not useful to
present the user with the `!` badge.

Therefore uBO will not show the badge *only* when at least one
unprocessed network requests should have been blocked had uBO been
ready when it was fired by the browser.

Related commit:
- https://github.com/gorhill/uBlock/commit/769b8da664be
2023-03-30 12:30:44 -04:00
Raymond Hill 3d1c696e20
Support view source of "other" type 2023-03-30 12:29:02 -04:00
Raymond Hill 08d411a7b4
Clear network error status when list fetch succeed 2023-03-30 12:28:02 -04:00
Raymond Hill cee3c4822d
Make Firefox dev build auto-update 2023-03-29 13:11:15 -04:00
Raymond Hill 0758ea86ef
New revision for dev build 2023-03-29 13:04:56 -04:00
Raymond Hill 6461393b6a
Prevent repeatedly launching emergency updates
Emergency update of assets could be repeatedly launched
every 15 seconds if a resource could not be fetched from
a server. A cooldown period has been added to prevent
repeatedly launching emergency updates.
2023-03-29 13:02:48 -04:00
Raymond Hill 8d445e782d
Add widget to filter firewall rows in popup panel
This replaces the limited "visually enhance rows" togglers.
2023-03-29 12:47:18 -04:00
Raymond Hill 189bdd685f
Properly report network error condition when importing filter list
Before this commit, a network error condition was not reported
when the filter list was imported, it was only reported afterward
when the imported filter list was updated.
2023-03-28 09:54:03 -04:00
Raymond Hill d31e14995e
Make Firefox dev build auto-update 2023-03-28 08:55:51 -04:00
Raymond Hill d586bd7f2f
New revision for dev build 2023-03-28 08:47:36 -04:00
Raymond Hill 391b2a4e67
Test for presence of vAPI in deferred methods 2023-03-28 08:39:36 -04:00
Raymond Hill 198c20db76
Return error when GET returns a non-plain text file 2023-03-28 08:38:34 -04:00
Raymond Hill 8507d637e5
Add support for negated hostnames in HTML filters
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/6
2023-03-28 08:35:09 -04:00
Raymond Hill 3658d70cc4
Add missing 64px icons 2023-03-27 18:18:21 -04:00
Raymond Hill 885b3ea6c0
Fix spurious update cycle attempts
Caused by the fact that external filter lists do not have an
`off` property even when they are not enabled.

Additionally, set the default update cycle check period to 2hr.
2023-03-27 15:04:44 -04:00
Raymond Hill 10f9559a52
Add 64px toolbar icon for 4K displays
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2477
2023-03-27 12:59:39 -04:00
Raymond Hill 08815e9798
Make Firefox dev build auto-update 2023-03-27 09:26:12 -04:00
Raymond Hill e252606ccd
New revision for dev build 2023-03-27 09:20:43 -04:00
Raymond Hill 75abf77e62
Fix patching `{{args}}` when instances of `$` are present
Related feedback:
- https://github.com/uBlockOrigin/uAssets/issues/16715#issuecomment-1484232457
2023-03-27 09:04:35 -04:00
Raymond Hill c3a2c0fb9f
Make Firefox dev build auto-update 2023-03-26 20:51:04 -04:00
Raymond Hill ea6279a75c
New revision for dev build 2023-03-26 20:39:56 -04:00
Raymond Hill f7f776fb8a
Aggressively update assets when at least one is very obsolete
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1165
2023-03-26 20:32:51 -04:00
Raymond Hill a8a46c4593
Normalize non-ASCII characters in `:matches-path()` argument
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2369
2023-03-26 15:37:15 -04:00
Raymond Hill c8af55e27a
Harden aeld scriptlet against page's tampering
Related feedback:
- https://github.com/uBlockOrigin/uBlock-discussions/discussions/1#discussioncomment-5433222
2023-03-26 14:02:21 -04:00
Raymond Hill 69e54e5db7
Make Firefox dev build auto-update 2023-03-26 13:21:30 -04:00
Raymond Hill d4bc1adab3
New revision for dev build 2023-03-26 13:15:29 -04:00
Raymond Hill da672d4dbf
Add extra check to detect function declaration in scriptlets
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/122pqyg/
2023-03-26 13:14:00 -04:00
Raymond Hill 5c9c87e485
Add ability for scriptlets to share local data
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1741

As a result of the new capability, usage of RegExp API in `aost`
scriptlet has been shielded from the webpage tampering with the
API.
2023-03-26 12:31:36 -04:00
Raymond Hill c7c748862e
Make Firefox dev build auto-update 2023-03-26 09:20:42 -04:00
Raymond Hill 8735631f6c
New revision for dev build 2023-03-26 09:14:49 -04:00
Raymond Hill 236fb3ad59
Add scriptlet dependencies to reduce code duplication 2023-03-26 09:13:17 -04:00
Raymond Hill 439951824a
Remove addEventListenerLogger, expand addEventListenerDefuser
The scriptlet addEventListenerLogger has been removed.

The logging of addEventListener() calls can now be done with the
addEventListenerDefuser scriptlet, which now supports the
following named arguments:

"type": the event type to match. Default to '', i.e. match-all.

"pattern": the pattern to match against the handler argument
Default to '', i.e. match-all.

"log": an integer value telling when to log:

- 1: log only when both type and pattern matches, i.e. when a
     call to addEventListener() is defused
- 2: log when either the type or pattern matches
- 3: log all calls to addEventListener()

"debug": an integer value telling when to break into the
 debugger, useful to inspect the debugger's call stack.

- 1: break into the debugger when both type and pattern match,
     so effectively when defusing is taking place.
- 2: break into the debugger when either type or pattern matches.

The usage of named arguments is optional, positional arguments
are still supported as documented. Named arguments is required
to use "log" and/or "debug" arguments.

Obviously, do not use "log" or "debug" in any filter list, these
are investigative tools for filter list authors.

Examples of usage using named arguments:

  wikipedia.org##+js(aeld, { "type": "/mouse/", "pattern": "/.^/", "log": 2 })

Above filter will log calls to addEventListener() which have the
pattern "mouse" in the event type (so "mouseover", "mouseout",
etc.) without defusing any of them (because pattern can't match
anything).

  wikipedia.org##+js(aeld, { "type": "/.^/", "log": 2 })

Above filter will log all calls without defusing any of them
(because type can't match anything)

  wikipedia.org##+js(aeld, { "log": 1 })

Above filter will log and defuse all calls to addEventListener().
2023-03-25 12:35:56 -04:00
Raymond Hill a51130baed
Remove unused scriptlets 2023-03-24 18:46:39 -04:00
Raymond Hill a355a73aa2
Make Firefox dev build auto-update 2023-03-24 16:10:33 -04:00
Raymond Hill c1045ad20b
New revision for dev build 2023-03-24 15:58:59 -04:00
Raymond Hill a42374199e
Fix regression in parsing scriptlet arguments
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2557
2023-03-24 15:57:48 -04:00
Raymond Hill 21ccaaf804
Make Firefox dev build auto-update 2023-03-24 14:45:57 -04:00
Raymond Hill 1b45918119
New revision for dev build 2023-03-24 14:30:23 -04:00
Raymond Hill 18a84d2819
Refactor scriptlets injection code
Builtin scriptlets are no longer parsed as text-based resources,
they are imported as JS functions, and `toString()` is used to
obtain text-based representation of a scriptlet.

Scriptlet parameters are now passed as function call arguments
rather than by replacing text-based occurrences of `{{i}}`. The
arguments are always string values (see below for exception).

Support for argument as Object has been added. This opens the
door to have scriptlets using named arguments rather than
positional arguments, and hence easier to extend functionality
of existing scriptlets. Example:

    example.com##+js(scriplet, { "prop": "adblock", "value": false, "log": true })

Compatibility with user-provided scriptlets has been preserved.

User-provided scriptlets can benefit some of the changes:

Use the form `function(..){..}` instead of `(function(..){..})();`
in order to received scriptlet arguments as part of function call
-- instead of using `{{i}}`.

If using the form `function(..){..}`, you can choose to receive
an Object as argument -- just be sure that your scriptlet's
parameter is valid JSON notation.
2023-03-24 14:05:18 -04:00