1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-19 03:05:22 +02:00
Commit Graph

37 Commits

Author SHA1 Message Date
Raymond Hill
bb462e6e5d
Actual icon color is #FFCC00, not #FC0 2023-03-18 12:27:40 -04:00
Raymond Hill
a72c068bcc
Make badge color consistent with filtering status
Related commit:
- 32508620a2
2023-03-18 12:16:20 -04:00
Raymond Hill
32508620a2
Emphasize broken filtering at launch on toolbar icon badge
Related feedback:
- 769b8da664 (commitcomment-104695781)

The incomplete filtering status of a given tab at browser launch
will be carried over visually as a yellowish `!` badge until the
web page in the tab is force reloaded, navigated away, or closed.

The purpose is to make it obvious to end users that a web page
has not been filtered properly and to avoid issue reports
related to this.

It is expected that Firefox should never be affected by cases of
yellowish badge -- that is unless the setting "Suspend network
activity [...]" has been disabled, in which case the new behavior
will also be useful to those who disabled the setting.
2023-03-18 11:35:06 -04:00
Raymond Hill
769b8da664
Finalize "unreadiness" toolbar icon
- Yellow uBO toolbar icon: uBO not ready

- Yellow uBO toolbar icon + `!` badge: network requests went
  through while uBO is not ready
2023-03-16 07:13:27 -04:00
Raymond Hill
39cac612c2
Use the warning toolbar icon only if unprocessed requests
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/16939

Related commit:
- 0c9576d3e6
2023-03-15 21:13:28 -04:00
Raymond Hill
f9b03ebeac
Report unprocessed network request count in troubleshooting info
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/16939
2023-03-08 09:36:09 -05:00
Raymond Hill
0c9576d3e6
Show a distinct toolbar icon until filtering engines are fully initialized
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/16939

Until uBO's filtering engines are properly initialized, there will
be a distinct toolbar icon to help users understand that uBO may
not be fully initialized when a webpage is loaded -- often the
cause of improper filtering of trackers/ads at browser launch.
2023-03-07 16:02:09 -05:00
Raymond Hill
454a03a98f
Use block scope to isolate context 2023-02-24 18:02:28 -05:00
Raymond Hill
e2c3917ecd
Unconditionally set label of toolbar icon
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2409
2022-12-15 10:04:03 -05:00
Raymond Hill
a91781a495
Rewrite logger's "exceptor" feature
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1861

The "exceptor" feature has been rewritten, with the following
changes as a result:

- The excepted filters cease to exist when closing the logger
- It's now possible to temporary except network filters

When toggling on/off a temporary exception, filter lists are now
fully reloaded. This simplified managing temporary exceptions, and
made it easy to implement temporary exception for network filters,
but this also means there might be a perceptible delay when
adding/removing temporary exceptions. At this point I consider
this an acceptable side-effect just to bring the ability to easily
create temporary exception for network filters, while this
simplified the existing temporary exception code throughout.
2022-12-14 16:04:45 -05:00
Raymond Hill
58e60d6d96
Fix various regressions in latest dev build
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2404
- https://github.com/uBlockOrigin/uBlock-issues/issues/2400#issuecomment-1346050327
2022-12-12 14:02:57 -05:00
Raymond Hill
0bfffb80c4
Fix spurious warning
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2243
2022-10-05 07:28:01 -04:00
Raymond Hill
0c9ab84846
Fix redundant calls to extract image data
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2243#issuecomment-1236194011
2022-09-04 10:40:26 -04:00
Raymond Hill
127ea05a9e
Replace responsive with intab for better remdering og panel in a tab
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2116#issuecomment-1143634719
2022-06-04 11:12:45 -04:00
Raymond Hill
1c090f0fae
Use string template 2022-06-03 12:27:51 -04:00
u-RraaLL
614b8328e9
Update popup url
Fix broken functionality caused by the removal of the classic popup.
2022-05-21 09:42:08 +02:00
Raymond Hill
60072e7996
Minor code review
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1992
2022-02-18 06:52:34 -05:00
Raymond Hill
e1e2ba3d5d
Use unspoofable Messenger.origin to determine privilege level of ports
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1992
2022-02-17 18:05:01 -05:00
Raymond Hill
3154ed1bac
Remove test for whether Chromium version is less than 66
The test is no longer needed given that the minimum supported
version is Chromium 66.
2022-02-17 09:07:56 -05:00
Raymond Hill
2933016d4b
Rework behavior of "Suspend network activity until ..."
The setting will default to the natural capability of the browser:

- Checked for Firefox
- Unchecked for Chromium-based browsers

For Chromium-based browser, if checked, network requests will be
redirected to an empty resources instead of blocking the
connection.

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1973
- https://www.reddit.com/r/uBlockOrigin/comments/squo8n/latest_update_blocks_network_connections_at/
2022-02-13 09:24:57 -05:00
Raymond Hill
a2d83afe66
Further narrow when unconditionally calling webRTCIPHandlingPolicy.clear()
The enabled cached state probably exists in the browser only
when the setting was originally enabled -- so we need to clear
it only in such case.
2022-02-06 09:00:25 -05:00
Raymond Hill
00b257caa7
Unconditionally call webRTCIPHandlingPolicy.clear() at launch
On Chromium-based browsers only.

Related issue/feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1928
- https://www.reddit.com/r/uBlockOrigin/comments/sl7p74/
2022-02-05 12:04:08 -05:00
Raymond Hill
925c8d5d0c
Add setting to control suspension on network activity at launch
Related discussion:
- a0a9497b4a (commitcomment-62560291)

The new setting, when disabled (enabled by default), allows a user
to prevent uBO from waiting for all filter lists to be loaded
before allowing network activity at launch. The setting is enabled
by default, meaning uBO waits for all filter lists to be loaded in
memory before unsuspending network activity. Some users may find
this behavior undesirable, hence the new setting.

This gives the option to potentially speed up page load at launch,
at the cost of potentially not properly filtering network requests
as per filter lists/rules.

For platforms not supporting the suspension of network activity,
the setting will merely prevent whatever mechanism exists on the
platform to mitigate improper filtering of network requests at
launch. For example, in Chromium-based browsers, unchecking the
new setting will prevent the browser from re-loading tabs for
which there was network activity while in "suspended" state at
launch.
2021-12-30 09:24:38 -05:00
Raymond Hill
ca1ec1461b
Narrow usage of webRTCIPHandlingPolicy to only firefox
In addition of `mobile`, just in case -- some people are
using mobile version of chromium out there.
2021-12-11 07:37:18 -05:00
Raymond Hill
318469b005
Remove unused function 2021-10-22 08:34:04 -04:00
Raymond Hill
e4d75fa025
Ignore unused tabs.onUpdated() events 2021-10-17 12:55:31 -04:00
Raymond Hill
b0038eac28
Remove unused code path
Versions of Firefox 54 and lower are no longer supported.
2021-10-13 11:17:21 -04:00
Raymond Hill
c4b7ee80ea
Further work on JS modules
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664
2021-10-07 14:41:29 -04:00
Raymond Hill
4100761863
Keep ability to prevent local IP address leaks for mobile version
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1723

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1723#issuecomment-919913361
2021-09-15 08:28:10 -04:00
Raymond Hill
831cf478da
Revert "Remove now obsolete webrtc-related setting"
This reverts commit af41aadab7.
2021-09-15 07:40:32 -04:00
Raymond Hill
af41aadab7
Remove now obsolete webrtc-related setting
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1723

The leaking of local IP addresses is no longer an issue
in modern browsers.
2021-09-14 10:04:35 -04:00
Raymond Hill
cbec7397fc
Fix jshint warnings
Those warnings surfaced as a result of removing the braces
used to create a local namespace.
2021-08-03 12:08:59 -04:00
Raymond Hill
98fc66bb1b
Add support for enabling WASM code paths in NodeJS package
See `test.js` for reference on how to enable WASM code
paths (which are disabled by default).
2021-07-29 16:54:51 -04:00
Raymond Hill
22022f636f
Modularize codebase with export/import
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664

The changes are enough to fulfill the related issue.

A new platform has been added in order to allow for building
a NodeJS package. From the root of the project:

    ./tools/make-nodejs

This will create new uBlock0.nodejs directory in the
./dist/build directory, which is a valid NodeJS package.

From the root of the package, you can try:

    node test

This will instantiate a static network filtering engine,
populated by easylist and easyprivacy, which can be used
to match network requests by filling the appropriate
filtering context object.

The test.js file contains code which is typical example
of usage of the package.

Limitations: the NodeJS package can't execute the WASM
versions of the code since the WASM module requires the
use of fetch(), which is not available in NodeJS.

This is a first pass at modularizing the codebase, and
while at it a number of opportunistic small rewrites
have also been made.

This commit requires the minimum supported version for
Chromium and Firefox be raised to 61 and 60 respectively.
2021-07-27 17:26:04 -04:00
Raymond Hill
c9710ac9d1
Better deal with no-longer-existing ports
Disconnected ports could still happen Even when the port
was still seen as valid internally. Using a try-catch
block makes invalid port detection more reliable. This
is an occurrence I often encountered when stepping into
content script code, causing suprious error messages to
be thrown into uBO's background dev console.
2021-07-19 11:25:52 -04:00
Raymond Hill
bad1506f20
Move chromium-specific code path to chromium directory 2021-07-16 10:29:39 -04:00
Raymond Hill
a4aced69dc
Reorganize platform directory to avoid Chromium-centric appearance
Though Firefox shares a lot of WebExtensions code with Chromium,
these platforms have their own specific code paths, for various
reasons.

The reorganization here makes it clear that Chromium platform is
just one flavor of WebExtensions, and as such all Chromium-specific
code paths should no longer be automatically pulled by other
platforms where these code paths are not needed.

Given that the filepath of many files changed, here is the
parent commit to quickly browse back to the previous directory
layout:

ec7db30b2f
2021-07-16 10:06:58 -04:00