1.48.0
gorhill/uBlock1.48.0Mar 21, 2023by github-actions[bot]
AI Summary
A major feature update introducing a code viewer for inspecting HTML/CSS/JS, visual indicators for uBO's readiness at browser launch, and a new source code viewer context menu.
Key Highlights
- Added code viewer for beautified HTML/CSS/JS source code
- Introduced readiness status indicators (yellowish icon) at browser launch
- Added experimental `href-sanitizer` scriptlet
- Added context menu option to view source code in author mode
- Fixed broken http header filtering
New Features
- Code viewer
- Readiness status indicators
- Source code viewer context menu
- href-sanitizer scriptlet
Full Release Notes
[Commits to master since this release](https://github.com/gorhill/uBlock/compare/1.48.0...master)
[Commits since last release](https://github.com/gorhill/uBlock/compare/1.47.4...1.48.0)
To install the stable build:
- **Firefox**: Click [uBlock0_1.48.0.firefox.signed.xpi](https://addons.mozilla.org/firefox/downloads/file/4086892/ublock_origin-1.48.0.xpi)
- [uBO works best on Firefox](https://github.com/gorhill/uBlock/wiki/uBlock-Origin-works-best-on-Firefox).
- **Chromium**: Install from the Chrome store (CWS): <https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm>
- **Edge**: Install from Microsoft Store: <https://microsoftedge.microsoft.com/addons/detail/odfafepnkmbhccpbejgmiehpchacaeak>
- The Microsoft Store version of uBO is published by [Nicole Rolls](https://github.com/nicole-ashley/uBlock-Edge)
- **Opera**: Install from Opera addons: <https://addons.opera.com/en/extensions/details/ublock/>
---
## New
### Readiness status at browser launch
uBO's readiness at browser launch time is a particularly prickly issue on Chromium-based browsers,<sup>[1]</sup> especially [more so since Chromium 110](https://github.com/uBlockOrigin/uAssets/discussions/16939). This leads to numerous reports of _"uBlock stopped working"_, which are simply caused by the fact that at launch time the browser started to load webpages before uBO was ready to filter properly (because the filter lists were not fully loaded in memory).
To reduce the number of reports caused by this issue which is outside of uBO's control, uBO's toolbar icon will now reflect its readiness status at browser launch (i.e. make visible to users what has always been happening):
1. A yellowish toolbar icon means that uBO is currently loading all filter lists into memory and as such is not ready to filter properly:

2. If additionally there is a yellowish `!` badge while uBO is working toward readiness, this means network requests were fired by the browser which could not be processed by uBO, potentially leading to ads/trackers/etc. not being filtered in some of the already opened webpages:

3. Once uBO is ready to filter properly, a yellowish `!` badge on a normally colored toolbar icon means that the current webpage was not filtered properly at browser launch, potentially causing the current webpage to be afflicted by ads/trackers/etc.:

4. To remediate the browser launch filtering issue on a given webpage, you can simply force a reload of that webpage, which as a result will bring back the badge to be rendered as expected:

For Chromium-based browsers, it is possible to automate step 4 above by checking the setting [_Suspend network activity until all filter lists are loaded_](https://github.com/gorhill/uBlock/wiki/Dashboard:-Filter-lists#suspend-network-activity-until-all-filter-lists-are-loaded) in [_Filter lists_ pane](https://github.com/gorhill/uBlock/wiki/Dashboard:-Filter-lists) in the [dashboard](https://github.com/gorhill/uBlock/wiki/Dashboard). Caveat: in the past some users have reported this negatively interfered with page loading at browser launch time in some cases ([example](https://github.com/uBlockOrigin/uBlock-issues/issues/1973), [example](https://www.reddit.com/r/uBlockOrigin/comments/squo8n/)), hence why it is optional and not enabled by default in Chromium-based browsers.
With Firefox-based browsers, you should typically only see step 1 and 4 above, unless you disabled the setting _Suspend network activity until all filter lists are loaded_, which is enabled by default in Firefox.
<sub>[1] See [_uBlock Origin works best on Firefox_ / _Browser launch_](https://github.com/gorhill/uBlock/wiki/uBlock-Origin-works-best-on-Firefox#browser-launch)</sub>
### Code viewer
Investigating filter issues can be a serious time sink, and to help with this, a code viewer has been added to uBO. The code viewer will automatically beautify HTML/CSS/JS code, which should be an improvement over the browser built-in `view-source` tool.
You can view beautified source code of HTML/CSS/JS resources when clicking the link in a logger entry. Additionally, if the [advanced setting `filterAuthorMode`](https://github.com/gorhill/uBlock/wiki/Advanced-settings#filterauthormode) is set to `true`, an entry labelled _View source code..._ will be added to the context menu, so that you can view the source code of any page/resource without having to open the logger.
## Fixes / changes
- [Fix broken http header filtering](https://github.com/gorhill/uBlock/commit/72cc9a8fe830ea6ea919defa87990f64ce4f8aa6)
- [Prevent dashboard from loading at browser launch until ready](https://github.com/gorhill/uBlock/commit/5c92d95143b07aaee6f04a41db6e0a3e9a55db06)
- [Support removing whole lines of text with regex in m3u-prune scriptlet](https://github.com/gorhill/uBlock/commit/b3821e6869d45b5697c44922ee7242e35e11a29d)
- [Fix broken filter parsing when prepended with spaces](https://github.com/gorhill/uBlock/commit/b63ced24d415827342ac14b3924e68054851f398)
- [Context of `about:blank` is that of parent frame (`popup` option)](https://github.com/gorhill/uBlock/commit/574f30ed43a02355c49c09d5b970619f1174f3b3)
- [Add experimental `href-sanitizer` scriptlet](https://github.com/gorhill/uBlock/commit/e123256eaf64be19f81eba123970db07b45eb0ae)
- [Prevent dialog box from overflowing logger's viewport](https://github.com/gorhill/uBlock/commit/7bf3f1bd2008d0f6483ca890414294714f665286)
- [Make parser take into account `filterOnHeaders` setting](https://github.com/gorhill/uBlock/commit/890aabaae942315c9b06985723188ef8c3889821)
- [Show a distinct toolbar icon until filtering engines are fully initialized](https://github.com/gorhill/uBlock/commit/0c9576d3e609d3bc43ed5468ec4a8eb017642ad8)
- [Add source code viewer](https://github.com/gorhill/uBlock/commit/33c437f99f30daa3172b097ba35ae662239f6013)