1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-29 14:17:11 +02:00
Commit Graph

3088 Commits

Author SHA1 Message Date
Raymond Hill
24ab492b77
Fix overlooking whether auto-update is disabled
Related feedback:
https://old.reddit.com/r/uBlockOrigin/comments/18ktpd5/
2023-12-18 10:41:48 -05:00
Raymond Hill
ebd9d93666
Prevent element picker from throwing when targeting html/body
Occurred when element picker was launched from context menu
as a result of clicking on `html` or `body` elements.
2023-12-16 11:23:58 -05:00
Raymond Hill
9f4b31a96f
Add detection of mismatched!#if-!#endif in linter
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/1712
2023-12-15 16:57:49 -05:00
Raymond Hill
d56468b4ec
Fix launch of auto update shortly after launch
Regression from:
https://github.com/gorhill/uBlock/commit/bd7ce41224
2023-12-15 09:59:56 -05:00
Raymond Hill
a2caa7da78
Fix heuristic to verify whether a resource on a remote server is stale
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/discussions/3022
2023-12-14 16:51:28 -05:00
Raymond Hill
5e3f9695b4
Support links to update lists which are differential update-friendly
If the `manual` parameter is assigned a date in the form of
`YYMMDD`, this will tell uBO to update lists from origin sources
when the current time is within the range of the specified date,
otherwise lists will be updated from CDNs. Updating from CDNs
is always strongly recommended since this enables differential
updates.

For the time being, `manual=1` will always cause to update lists
from origin, but this form will be deprecated once next stable
release is widespread. The idea is to not leave behind stale
and obsolete links which would be detrimental to differential
updates should someone click on one of these old links left
behind.
2023-12-14 09:50:11 -05:00
Raymond Hill
bd7ce41224
Remove "Purge all caches" button from "Filter lists" pane
Purging all the lists from cache storage is detrimental to
differential update, and cause filter lists to be updated less
often and consequently to be less up to date then when letting
differential updater do its work.
2023-12-13 21:01:51 -05:00
Raymond Hill
14926913f7
Add support for all list token in updater-link feature
Using `listkeys=all` will cause all enabled lists to be updated.
2023-12-12 11:04:16 -05:00
Raymond Hill
4305ea9c0c
Fix logging of broad exception filter #@#+js()
Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/843

Regression from:
https://github.com/gorhill/uBlock/commit/1a863a877d
2023-12-12 08:21:47 -05:00
Raymond Hill
a3e3cd9216
Ensure cache storage backend is selected before use
Related commit:
bfa28b960e
2023-12-11 12:17:25 -05:00
Raymond Hill
bfa28b960e
Ensure cache storage is selected before access
Possibly related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2136

Also reported internally, steps to reproduce the issue fixed here:

- Open uBO's dashboard through 3-dot > Add-ons > uBO > Settings
- Bring forth "Filter lists" pane
  We want the tab to be already opened at next launch
- Quit Firefox for Android
- Launch Firefox for Android

Result:

Very long launch time, lists marked as out of date.
2023-12-10 12:33:51 -05:00
Raymond Hill
4183ce477a
Fix popup panel rendering when embedded in logger
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3015
2023-12-09 17:54:02 -05:00
Raymond Hill
7e44db763e
Add visual hint in support information re. differential update
In Support pane's troubleshooting information, a delta sign will
be added to list update information when the list was last updated
through differential update.
2023-12-08 15:28:20 -05:00
Raymond Hill
310bfec6a1
Remove obsolete web accessible resources 2023-12-08 12:06:34 -05:00
Raymond Hill
b35d17143b
Fix DNR output in uBO's dev tools page 2023-12-08 11:45:39 -05:00
Raymond Hill
cdc5e89f52
Rename urltransform to uritransform
Related commit:
https://github.com/uBlockOrigin/uAssets/commit/20312c2178

To work around incompatibity with `urltransform` in 1.53.0.
With this commit support for `urltransform` is dropped in
favor of `uritransform`. Since `uritransform` won't be parsed
by older versions of uBO, the change in syntax for `urltransform`
between 1.53.0 and 1.54.0 will no longer cause issue.
2023-12-08 10:07:11 -05:00
Raymond Hill
885bc3875b
Vertically expand/collapse in steps in dom inspector
Additionally, lock the inspected page to the item under
the mouse in the dom inspector.
2023-12-07 20:59:45 -05:00
Raymond Hill
15b1250c99
[firefox] Fix DOM inspector being broken in private window
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3004

Related commit:
ee83a4304a

Use extensions API message ports to establish direct communication
between content script and logger window.
2023-12-06 21:16:48 -05:00
Raymond Hill
06d22ca6c3
Fix details regarding light/dark theme in dom inspector
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/1411#issuecomment-1841509464
2023-12-05 17:38:12 -05:00
Raymond Hill
71be1a4fe5
[mv3] Detect and discard regex-based from=/to= domains 2023-12-05 09:18:58 -05:00
Raymond Hill
eb66820728
]firefox] Improve load time & behavior from suspended state
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2969

Changes:

Use browser.alarms to trigger selfie creation. Presence of a selfie
improve markedly time to readiness when uBO is unsuspended.

Mirror content of storage.local to (in-memory) storage.session for
faster load to readiness when uBO is ususpended.
2023-12-04 15:15:08 -05:00
Raymond Hill
a969a672e0
Change official description in source code top comment 2023-12-04 12:10:34 -05:00
Raymond Hill
5dcb9d42ab
Add support to auto-complete permissions= 2023-12-04 11:19:06 -05:00
Raymond Hill
c744c87607
Reset the DOM inspector when URL in top context changes
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/542
2023-12-04 08:07:53 -05:00
Raymond Hill
03ea001681
Minor 2023-12-03 16:26:05 -05:00
Raymond Hill
ee83a4304a
Isolate DOM inspector layers from page context
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/1411

Additionally, refactored communication mechanism between content
script contexts and uBO contexts by using MessageChannel/BroadcastChannel
web APIs.
2023-12-03 16:21:32 -05:00
Raymond Hill
67fb969572
Refactoring: Replace DOM events with broadcast channels
Broadcast channels are more suited to uBO than DOM events to dispatch
notifications to different parts of uBO.

DOM events can only be dispatched to local context, broadcast channels
dispatch to all contexts (i.e. background process, workers, auxiliary
pages) -- this last behavior is better suited to uBO to communicate
internal changes to all potential listeners, not just those in the local
context.

Additionally, broadcasting to content scripts is now done through
tabs.sendMessage() instead of through potentially opened message
ports, this simplifies broadcasting to content scripts, and this
doesn't require to have long-lived message ports in content
scripts.
2023-12-01 14:35:28 -05:00
Raymond Hill
c4de5552e5
Fix non-filter lists ending into selected lists at install time
Fortunately, getAvailableLists() filters out non-filter
list resources thus preventing those mistakenly selected
resources from being loaded as filter lists.
2023-12-01 12:03:54 -05:00
Raymond Hill
ea7d411bc2
Support non-default sticky lists
"Sticky" lists are those which stay visible when collapsing
non-used lists in the "Filter lists" pane.
2023-12-01 08:31:28 -05:00
Raymond Hill
5a338b7210
Change frequency of save-to-storage blocking stats
In order to prepare for support of non-persistent background
process.
2023-11-25 11:22:26 -05:00
Raymond Hill
9ce958432d
Catch cases of ! Expires: field with no value 2023-11-22 13:40:49 -05:00
Raymond Hill
2da9f0b03f
[mv3] Ensure filters incompatible with DNR are properly reported 2023-11-18 10:46:25 -05:00
Raymond Hill
0c29374a72
Add abp-resource:blank-mp4 alias for increased ABP compatibility 2023-11-18 10:04:52 -05:00
Raymond Hill
3fd2588650
Allow scriptlets to be injected in about:blank
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2963
2023-11-16 17:07:48 -05:00
Raymond Hill
bd8a91ed3a
Add support to redirect to noop.json
There ar ea couple of AdGuard filters supporting this local
resource.

Reference:
https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-redirects.md#noopjson
2023-11-16 09:54:21 -05:00
Raymond Hill
dac320e396
Fix bad argument passing 2023-11-14 18:03:02 -05:00
Raymond Hill
0b871e6546
If response is 404, skip trying other CDNs
When there is a 404 response, in all likelihood other
CDNs will also return 404, no point pointlessly fetching
from others.
2023-11-14 17:39:48 -05:00
Raymond Hill
6a9c69aa94
Add support for minute unit 2023-11-14 13:53:17 -05:00
Raymond Hill
d2b8d990e6
All exceptions filters are exempt from requiring a trusted source
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2895#discussioncomment-7566154
2023-11-14 09:58:26 -05:00
Raymond Hill
92c0088f64
Keep assetKey and diffName well separated 2023-11-13 14:55:52 -05:00
Raymond Hill
7b2149e595
Fix quirks re. diff-updater 2023-11-13 09:42:31 -05:00
Raymond Hill
1db569d4ee
Fix last commit
Related commit:
e30223c42e

This needs to be done with currently cached list, not with
failed modified list.
2023-11-11 19:54:05 -05:00
Raymond Hill
e30223c42e
Add check-then-fix code to ensure diff-path name in sync
There is a lot asynchronicity in the auto-update code, and
the fix here is to detect then fix instances of out of sync
state between a cached filter list and its metadata stored
separately.
2023-11-11 15:51:59 -05:00
Raymond Hill
4422926b63
Add more details to error message 2023-11-11 13:25:58 -05:00
Raymond Hill
193672dae5
Extract diff-name from diff-path when diff-name field is missing 2023-11-11 09:35:08 -05:00
Raymond Hill
15e3f763a3
Mind exception filters for replace= option
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2952
2023-11-10 10:45:24 -05:00
Raymond Hill
9f52b4763e
Lookup asset key from diff name
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2948

This fix has to make it into next stable release to ensure
imported external lists can benefit from diff-updater.
2023-11-09 20:01:39 -05:00
Raymond Hill
ec53a8f2c7
Re-work unescaping arguments in parser
Related issue:
https://github.com/uBlockOrigin/uAssets/issues/5184#issuecomment-1803455520
2023-11-09 09:11:59 -05:00
Raymond Hill
9204fdf92c
Partially revert 3ff456a
Related feedback:
3ff456a63d (commitcomment-132105051)
2023-11-09 07:01:22 -05:00
Raymond Hill
831a707616
Typo in comment 2023-11-08 22:40:43 -05:00