1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-29 22:27:12 +02:00
Commit Graph

2123 Commits

Author SHA1 Message Date
Raymond Hill
405c3e1a84
Add visual hint for last selected entry in element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/47
2020-08-26 11:01:37 -04:00
Raymond Hill
817b87e9fc
Fine tune collapsed sections behavior 2020-08-25 14:26:44 -04:00
Raymond Hill
532ed5c390
Add ability to collpase unchanged rules in _My rules_ pane
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/604
2020-08-25 13:23:30 -04:00
Raymond Hill
fdbde27357
Fix default sort quirk
Related feedback:
- dd655473f6 (commitcomment-41730014)
2020-08-24 14:46:25 -04:00
Raymond Hill
0e9d4714e9
Mibor: better variable name 2020-08-24 12:40:36 -04:00
Raymond Hill
dd655473f6
Add ability to sort rules in _My rules_ pane
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1055
2020-08-24 12:39:07 -04:00
Raymond Hill
4150c17f4a
Add concept of "really bad list" to badlists infrastructure
This commit adds concept of "really bad list" to the
badlists infrastructure. Really bad lists won't be
fetched from a remote server, while plain bad list
will be fetched but won't be compiled.

A really bad list is denoted by the `nofetch` token
following the URL.

Really bad lists can cause more serious issues such
as causing undue launch delays because the remote
server where a really bad list is hosted fails to
respond properly and times out.

Such an example of really bad list is hpHosts which
original server no longer exist.
2020-08-22 08:43:16 -04:00
Raymond Hill
23f08f0274
Add support for blocklist of filter lists
Many filter lists are known to cause serious filtering
issues in uBO and are not meant to be used in uBO.

Unfortunately, unwitting users keep importing these
filter lists and as a result this ends up causing
filtering issues for which the resolution is always
to remove the incompatible filter list.

Example of inconpatible filter lists:
- Reek's Anti-Adblock Killer
- AdBlock Warning Removal List
- ABP anti-circumvention filter list

uBO will use the following resource to know
which filter lists are incompatible:
- https://github.com/uBlockOrigin/uAssets/blob/master/filters/badlists.txt

Incompatible filter lists can still be imported into
uBO, useful for asset-viewing purpose, but their content
will be discarded at compile time.
2020-08-21 11:57:20 -04:00
Raymond Hill
f6d1c6402f
Add support for removal of cloud storage entries 2020-08-21 09:18:33 -04:00
Raymond Hill
db79672355
Fix layout issue with cloud storage widget
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1217
2020-08-21 08:57:47 -04:00
Raymond Hill
394a61570c
Use modern popup panel in logger
The logger was still embedding the now deprecated popup
panel.
2020-08-21 08:23:36 -04:00
Raymond Hill
d8b6b31eca
Add support for cloud storage compression
Cloud storage is a limited resource, and thus it
makes sense to support data compression before
sending the data to cloud storage.

A new hidden setting allows to toggle on
cloud storage compression:

name: cloudStorageCompression
default: false

By default, this hidden setting is `false`, and a
user must set it to `true` to enable compression
of cloud storage items.

This hidden setting will eventually be toggled
to `true` by default, when there is good confidence
a majority of users are using a version of uBO
which can properly handle compressed cloud storage
items.

A cursory assessment shows that compressed items
are roughly 40-50% smaller in size.
2020-08-16 11:59:27 -04:00
Raymond Hill
2afcc13ca6
Add widget to convey the amount of sync storage in use 2020-08-14 15:29:25 -04:00
Raymond Hill
24ef0cb753
Fix typo in comment 2020-08-13 09:40:43 -04:00
Raymond Hill
00b790ce72
Add support for more !#if pre-parser directive tokens
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1205
2020-08-13 09:32:34 -04:00
Raymond Hill
45f26d7319
Better parsing of hosts file system addresses
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/877
2020-08-10 10:56:28 -04:00
Raymond Hill
b01cc6ca4f
Fix cloud storage errors not reported in user interface
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/i6e7lr/
2020-08-10 08:30:52 -04:00
Raymond Hill
79ccd23ccf
Also remove references to remove scriptlets
Related commit:
- 7c22a31294
2020-08-06 11:40:18 -04:00
Raymond Hill
f574a7e74d
Remove more cases of svg/use
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1196
2020-08-06 09:05:10 -04:00
Raymond Hill
290f3d124f
Fix stray <symbol> in path attribute
Related commit:
- 12be265e7d
2020-08-05 12:10:03 -04:00
Raymond Hill
12be265e7d
Fix performance issue with SVG-based icons in dashboard
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1196

For yet unknown reasons, in Chromium 84 the rendering of
`svg/use`-based icons in the dashboard causes page load
stall and undue high memory usage when the dashboard is
opened, especially the Filter list pane.

The fix in this commit is to avoid using `svg/use` and to
directly create and insert the `path` element defining an
icon.
2020-08-05 11:36:54 -04:00
Raymond Hill
dae25b0bae
Fix regression breaking filters with --prefixed pseudo-elements
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/89#issuecomment-668701495
2020-08-04 16:00:22 -04:00
Raymond Hill
4c6ee1e0d3
Fix broken :spath operators starting with >
Related feedback:
- 7dd48a6c8c (r41180568)

Regression from:
- 7dd48a6c8c
2020-08-04 11:30:04 -04:00
Raymond Hill
e44af458c0
Fine tune visuals of CodeMirror's search feature
Added a dotted box around found text occurrences,
as just pale yellow to highlight the text is not
enough to visually distinguish from surrounding text.

Iterating through found text occurrences will now
ensure they are vertically positioned in the middle
of the editor.
2020-08-04 10:14:38 -04:00
C0rn3j
3fed25a52d
Use ISO8061 dates in filter comments 2020-08-03 10:30:36 -04:00
Raymond Hill
50bf999a12
Fine tune CodeMirror editor's search widget
Code review following latest changes.

Also, move the input field to the left so that it
renders properly on smaller displays and does not
jump around when the result position/count numbers
change.

This also makes it easier to add more functionality
to the editor's toolbar in the future.
2020-08-03 08:55:02 -04:00
Raymond Hill
d654a5d6cf
Fix search operation broken by search worker going away
Related commit:
- 23332400f5

Since the search worker can go away after its time-to-live
elapsed, we may need to pass again the haystack on which
search operations are performed.
2020-08-02 12:46:52 -04:00
Raymond Hill
23332400f5
Improve annotations for search operations in CodeMirror editor
Before this commit, CodeMirror's add-on for search occurrences
was limited to find at most 1000 first occurrences, because of
performance considerations.

This commit removes this low limit by having the search
occurrences done in a dedicated worker. The limit is now
time-based, and highly unlikely to ever be hit under normal
condition.

With this change, all search occurrences are gathered,
and as a result:

- All occurrences are reported in the scrollbar instead of
just the 1,000 first

- The total count of all occurrences is now reported, instead
of capping at "1000+".

- The current occurrence rank at the cursor or selection
position is now reported -- this was not possible to report
this before.

The number of occurrences is line-based, it's not useful to
report finer-grained occurences in uBO.
2020-08-02 12:18:01 -04:00
Raymond Hill
90c7e79f4f
Consolidate filter list reverse lookup code into a single file
Since it's possible to execute specific code paths according
to whether the context is that of a worker or not, it's possible
to keep the main/thread code in a single file. Keeping the
main/worker code paths into a single file is more convenient
for both code maintenance and code review.
2020-08-01 10:32:40 -04:00
Raymond Hill
7dd48a6c8c
Allow :upward() operator to select html element
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/hvwwj0/element_hiding_by_url_not_by_domain_is_it_possible/fyzykw0/
2020-07-30 11:58:49 -04:00
Raymond Hill
aa37166ae7
Code review re. content scripts in about:blank frames
Related commit:
- 3b72c7cb04
2020-07-29 07:38:49 -04:00
Raymond Hill
3632c1821e
Tabs opened from about:newtab are not popup candidates
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1184
2020-07-29 07:13:08 -04:00
Raymond Hill
9447829eb1
Fix regression causing logger to fail to report cosmetic filters
Related commit:
- 5c68867b92
2020-07-27 13:30:57 -04:00
Raymond Hill
3df978ffd5
Make usage of space more strict in network filter patterns
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1118

Usage of space in network filter patterns will now be
strictly interpreted as the filter being a hosts file
entry.

Usage of space in any other scenario will cause the
pattern of the network filter to be rejected as
erroneous.
2020-07-27 10:20:11 -04:00
Raymond Hill
e98ea7ea9b
Instantiate procedural filterer instance on demand only
The procedural filterer will be instantiated only when
needed, i.e. only when there are actual procedural
filters to enforce.
2020-07-24 19:08:48 -04:00
Raymond Hill
3b72c7cb04
Ensure about: frames use proper origin
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/688

`about:` frames need to lookup and use the inherited
origin from their parent browsing context for proper
lookup of cosmetic filters.
2020-07-24 18:50:12 -04:00
Raymond Hill
5c68867b92
Deprecate pseudo user styles code
The pseudo user styles code served only browsers based
on Chromium 65 and earlier -- Chromium 66 supports
native user styles and was first released more than two
years ago.

In Chromium-based browsers, the pseudo user styles code
is being unconditionally injected in every page/frame
just in case the browser is version 65 or earlier.

Removing pseudo user styles reduce uBO's main content
script in Chromium-based browsers by more than 20K.

Related thread:
- https://github.com/NanoAdblocker/NanoCore/issues/348#issuecomment-653646507
2020-07-22 10:21:16 -04:00
Raymond Hill
3839d05a99
Auto-update most obsolete asset first
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1165
2020-07-21 07:50:36 -04:00
Raymond Hill
c805950ecf
Fix the logging of cosmetic filters in about:blank frames
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1164
2020-07-20 08:27:00 -04:00
Raymond Hill
85aef306d1
vAPI.tabs.executeScript() can't throw
Related commit:
- aed850978e

No need to mind rejected promise after all,
vAPI.tabs.executeScript() is designed to
not fail -- I had forgotten about this.
2020-07-19 18:38:35 -04:00
Raymond Hill
aed850978e
Mind discarded status of tabs when internally handling them
Related discussion:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1652925#c19

Content scripts should not be injected in discarded tabs, and
a discarded tab should treated as if it does not exist.
2020-07-19 17:41:13 -04:00
Raymond Hill
221983646e
Injects user styles and content scripts in about:blank frames
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/688
- https://github.com/uBlockOrigin/uBlock-issues/issues/1164

`match_about_blank` is now used for content scripts and
user styles.
2020-07-19 09:06:19 -04:00
Raymond Hill
fb0a442a9a
Fix improperly initialized counter
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1167

Related commit:
- feabfe3793
2020-07-19 09:01:45 -04:00
Raymond Hill
0549bfaf00
Do not implicitly strict-block when pattern contains no token char
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1147
2020-07-18 09:40:38 -04:00
Raymond Hill
feabfe3793
Do let grow subframe dictionary grow unbound
Related discussion:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1652925

It's not clear the code here will fix the reported
issue, but I did identify that the subframe
dictionary of a very long-lived web page can
theoretically grow unbound.
2020-07-18 07:44:26 -04:00
Raymond Hill
3789259fc9
Consider an empty pattern with anchors to be dubious
Related issue:
- https://github.com/ryanbr/fanboy-adblock/issues/1384
2020-07-17 10:08:08 -04:00
Raymond Hill
d5dcf4e9b6
Fix improper handling of srcset in element picker
Regression from:
- 16727d68c8

The issue was causing the element picker to being
unable to select elements with no valid `srcset`
property.

Test case -- trying to select one of the embedded
frames in the following page would fail:
- http://raymondhill.net/ublock/tiles1.html
2020-07-13 11:46:38 -04:00
Raymond Hill
d49a9dce66
Fix spurious rejection of some AdGuard redirect filters
Lines in AdGuard filter lists have trailing `\r`
characters, and these caused the redirect engine
compile code to reject as invalid the redirect
token.

This is trivially fixed by trimming the raw option
strings before parsing it in the redirect engine.
2020-07-13 09:33:38 -04:00
Raymond Hill
ba0d4f8a38
Fix the reporting of invalid static extended filters in the logger
This is a regression caused by the re-factoring necessary
to support the new static filtering parser code.
2020-07-12 13:00:18 -04:00
Raymond Hill
2eec28520f
Fix improper rejecting fitlers with $all,~document options
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1134#issuecomment-657122472
2020-07-12 10:39:57 -04:00