Raymond Hill
3dddf4ca47
Fix compiling of negated regex-based to=
domain
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2234#discussioncomment-5655665
2023-04-19 07:40:12 -04:00
Raymond Hill
f539f869b9
Fix counting of error deletion in linter
...
Related feedback:
- https://github.com/uBlockOrigin/uAssets/discussions/17538#discussioncomment-5628053
2023-04-16 08:23:49 -04:00
Raymond Hill
e15951dce5
Convert remaining vAPI.setTimeout to vAPI.defer
...
Related commit:
- 91f9795023
2023-04-14 10:26:45 -04:00
Raymond Hill
19db4e57f2
Make the toolbar warning timeout configurable
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2589
2023-04-14 09:55:06 -04:00
Raymond Hill
7347a2148a
No need for async
2023-04-13 22:24:49 -04:00
Raymond Hill
986ea0691d
Use Promise the way they are meant to be used
2023-04-13 15:03:19 -04:00
Raymond Hill
c97d0ab062
Forcefully clear unprocessed-request status after a minute
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2589#issuecomment-1507084473
2023-04-13 11:41:52 -04:00
Raymond Hill
bc54179edd
More aggressively clear the unprocessed-request status
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2589
2023-04-12 10:55:00 -04:00
Raymond Hill
464119af61
Link the reload button to clearing the unprocessed-requests status
2023-04-11 23:28:27 -04:00
Raymond Hill
6f3b5df8ef
Fix errand change re. new setTimeout wrapper
2023-04-11 10:33:21 -04:00
Raymond Hill
bf5f343548
Replace toolbar icon tooltip with message section in panel
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2585
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/126rn4f/yellow_toolbar_icon_exclamation_mark_badge/jfns0pc/
2023-04-10 17:10:00 -04:00
Raymond Hill
dad862f063
Properly detect incorrect usage of CSS combinators
...
Related discussion:
- https://www.reddit.com/r/uBlockOrigin/comments/12fquk4/ublock_is_on_but_im_still_getting_ads_on_this/jfpkz1g/
2023-04-10 15:13:03 -04:00
Raymond Hill
63d0f124ba
Replace requestIdleCallback() with new vAPI.defer utility
...
Related commit:
- 91f9795023
2023-04-10 10:10:19 -04:00
Raymond Hill
3b14fd915a
Fix cloud storage widget not showing (regression)
...
Related feedback:
- 50afd5ae38 (commitcomment-108294887)
2023-04-10 10:03:51 -04:00
Raymond Hill
91f9795023
Wrap usage of setTimeout in helper for background + auxiliary pages
...
This commit centralizes usage of setTimeout()/clearTimeout() in the
source code at one single location.
2023-04-09 13:38:16 -04:00
Raymond Hill
bec6cad2c0
Start using browser.alarms instead of setTimeout() where applicable
...
Related documentation:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Background_scripts#convert_to_non-persistent
2023-04-07 20:24:20 -04:00
Raymond Hill
66c70cf746
Fix improper detection of quotes in quoted strings
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2586
2023-04-07 18:10:50 -04:00
Raymond Hill
f2698b097c
Fix mv3 build
2023-04-06 17:42:21 -04:00
Raymond Hill
bc21a1fe72
Use custom linter gutter as container for code-folding widgets
...
This allows to reduce the horizontal size of the gutter; more efficient
management of folding since we already need to parse each line for the
linter; and eventually this will also allows to detect unbalanced
!#if-!#endif directives and report such cases as errors.
Additionally, keep incrementally improving error reporting details
in the linter.
2023-04-06 13:14:42 -04:00
Raymond Hill
028eee456f
Ensure error count is decrease when an error is fixed
2023-04-04 16:55:47 -04:00
Raymond Hill
d59eeba8e2
Fix tabs.executeScript() not resolving in due time
...
Related feedback:
- 6efd8eb84a
2023-04-04 14:28:48 -04:00
Raymond Hill
0f5384ee0d
Rename reported popup panel property
2023-04-04 13:42:09 -04:00
Raymond Hill
620a96531c
Report cosmetic filters as popup panel property
2023-04-04 13:20:58 -04:00
Raymond Hill
6efd8eb84a
Add matched cosmetic filters in troubleshooting information
2023-04-04 11:15:44 -04:00
Raymond Hill
09265ef57c
Simplify linter error counting by using line events
2023-04-04 09:24:18 -04:00
Raymond Hill
6e8aeae283
Flush memory cache at key filtering profile changes
...
To reduce the need for hard reload after changes in filters,
rules.
2023-04-03 10:19:06 -04:00
Raymond Hill
edbe96a401
Add logging ability to acs
scriptlet, for the benefit of filter list
...
maintainers.
To enable logging, use the JSON approach to pass parameters to
`acs` scriptlet. Example:
..##+js(acs, { "target": "document.oncontextmenu", "log": true })
Whereas "target", "needle", and "context" correspond to their
respective positional argument. Using JSON form to pass parameters
allows to specify extra paramters to facilitate debugging of that
scriptlet:
- `"log": true` => output useful information at the dev console.
- `"debug": true` => break at key locations in the scriptlet.
The added logging/debugging capabilities work only in the dev build
of uBO or if the advanced setting `filterAuthorMode` is set to
`true`.
2023-04-02 12:01:58 -04:00
Raymond Hill
95bd52d01f
Fine tuning new linter code
2023-04-02 10:40:44 -04:00
Raymond Hill
cda39709b1
Properly fail on bad network filter pattern
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1146
2023-04-02 10:05:42 -04:00
Raymond Hill
46e90b21e9
Code review of new linter code
...
As per CodeMirror's documentation, eachLine() iterator is
faster, so use this. Also no need to keep track or marked
lines, we can just find them on demand, this makes the code
simpler.
2023-04-02 09:19:32 -04:00
Raymond Hill
50afd5ae38
Add infrastructure for static filter syntax linter
...
Sort of related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1134
2023-04-01 16:42:41 -04:00
Raymond Hill
b10f15dd89
Ignore line, do not report as error
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2560#issuecomment-1492959500
2023-04-01 13:50:53 -04:00
Raymond Hill
e2d837a2db
Fix presumed network filter not being a valid network filter
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2560#issuecomment-1492959500
2023-04-01 09:05:36 -04:00
Raymond Hill
0d26064a26
Make object
equivalent of frame
for dynamic filtering purpose
...
Related issue:
- uBlockOrigin/uBlock-issues#2496
2023-03-31 09:46:22 -04:00
Raymond Hill
b4ae2d3bf4
Make object
equivalent of frame
for dynamic filtering purpose
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2496
2023-03-31 09:37:53 -04:00
Raymond Hill
e2a158d94b
Add check before accessing vAPI
2023-03-31 08:28:09 -04:00
Raymond Hill
5c85fdbc32
Fix typo in code
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2570#issuecomment-1491616007
2023-03-31 08:26:53 -04:00
Raymond Hill
b5d78a07bf
Fix type in variable name
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2570
2023-03-30 20:46:44 -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
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
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
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
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