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
rajiv
a8cf08325d
Add enableLazyLoad function
...
see https://developers.google.com/publisher-tag/reference#javascript_16
Fixes https://github.com/uBlockOrigin/uAssets/issues/20988
2023-12-01 02:20:40 -05:00
Raymond Hill
c16fcc1105
Import translation work from https://crowdin.com/project/ublock
2023-11-29 16:19:23 -05:00
Raymond Hill
2bd2e6a079
Import translation work from https://crowdin.com/project/ublock
2023-11-28 21:10:29 -05:00
Raymond Hill
430c578978
Import translation work from https://crowdin.com/project/ublock
2023-11-27 19:04:43 -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
f77481f740
Import translation work from https://crowdin.com/project/ublock
2023-11-20 12:47: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
Dave Vandyke
c1d8f5908d
More improvements to the google-ima shim script ( #3908 )
...
We have enabled the google-ima shim script again in the DuckDuckGo
Privacy Essentials browser extension, and found a couple more issues:
- Some websites set the enablePreloading[1] option, which should
cause[2] the AdsManager.init() method to trigger the LOADED AdEvent
to fire. If the event doesn't fire, those websites can get stuck
waiting for the event forever.
- When AdsManager.start() method is called, a bunch of events are
dispatched in order, to simulate ads loading, playing and
finishing. There was a mistake in that logic though. The
CONTENT_PAUSE_REQUESTED and CONTENT_RESUME_REQUESTED events[3]
should fire as the ads start and finish respectively. By firing the
latter early, and skipping the former, some websites got confused
and tried to display ad overlays at the same time as playing their
content, or didn't display they content at all.
1 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRenderingSettings#enablePreloading
2 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/preload#timing
3 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdEvent
2023-11-16 09:41:07 -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
7c6005278e
Import translation work from https://crowdin.com/project/ublock
2023-11-14 09:05:37 -05:00
Raymond Hill
6d38180608
Fix spurious change in i18n strings
2023-11-14 09:04:06 -05:00
Raymond Hill
92c0088f64
Keep `assetKey` and `diffName` well separated
2023-11-13 14:55:52 -05:00
Raymond Hill
a373efe9c0
Import translation work from https://crowdin.com/project/ublock
2023-11-13 10:34:09 -05:00
Raymond Hill
7b2149e595
Fix quirks re. diff-updater
2023-11-13 09:42:31 -05:00
Raymond Hill
b26d421a57
Add Punjabi (pa) translation
2023-11-12 13:51:50 -05:00
Raymond Hill
01d796346c
Import translation work from https://crowdin.com/project/ublock
2023-11-12 13:48:39 -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
130c437dd3
Import translation work from https://crowdin.com/project/ublock
2023-11-11 10:55:40 -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
Raymond Hill
1dba557c9a
Ensure CSSTree does not hold onto last parsed string
...
When done compiling, force CSSTree to parse an empty string, so
as to ensure it doesn't keep a reference to that string.
Typically, the string passed to CSSTree is a small slice of a
larger string which is a whole filter list. This means that
holding a reference to the sliced string causes the JS engine
to hold in memory to the whole filter list last parsed.
2023-11-08 22:33:01 -05:00
Raymond Hill
9ebed116da
Import translation work from https://crowdin.com/project/ublock
2023-11-08 19:44:33 -05:00
Raymond Hill
3c5491a8bd
Improve comment
2023-11-08 07:22:23 -05:00
Raymond Hill
856e8de64c
Diff-updater: report URL without the hash part
2023-11-08 07:16:23 -05:00
Raymond Hill
2170051c4a
Fix documentation in comment following recent changes
2023-11-07 17:29:25 -05:00
Raymond Hill
b8193ea5f9
Fix detection of unfilled filter list fields
...
Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/781#discussioncomment-7503866
2023-11-07 17:27:37 -05:00
Raymond Hill
3ff456a63d
Prefer CDNs when subscribing to a new list
...
Also, purging the cache of a list should not remove the
compiled version of that list so that it keep being seen
as cached, but obsolete.
2023-11-07 08:21:22 -05:00
Raymond Hill
ae24032607
Add more `replace`-able types
...
Reference:
https://en.wikipedia.org/wiki/M3U#Internet_media_types
2023-11-07 07:53:37 -05:00
Raymond Hill
2360bc02f3
Lower maximum `Expires` value to 4h
...
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2899
2023-11-06 19:45:16 -05:00
Raymond Hill
8ed1ad9c9d
Properly reset needle length in unserialized buffer
...
Possible related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2925
2023-11-06 19:22:47 -05:00
Imre Kristoffer Eilertsen
a2ab313ae2
Attempted to set flag codes for Chromium Windows users ( #3906 )
...
* Attempted to set flag codes for Chromium users
* Not sure how I missed MD.
2023-11-06 16:46:56 -05:00
Raymond Hill
11ebb736ca
Import translation work from https://crowdin.com/project/ublock
2023-11-06 12:16:48 -05:00
Raymond Hill
5d1618e1be
Reset potential `g` regex before use in `replace=` option
...
Related discussion:
https://github.com/uBlockOrigin/uAssets/issues/5184#issuecomment-1794058253
2023-11-06 07:16:41 -05:00
Raymond Hill
6417f54299
Apply response filtering according to mime type
...
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2833
2023-11-05 19:13:38 -05:00