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

2429 Commits

Author SHA1 Message Date
Raymond Hill
c25938f5bc
Ensure compiled sections are ordered in ascending id
Related issue:
- https://www.reddit.com/r/uBlockOrigin/comments/oq6kt5/ubo_loads_generic_filter_instead_of_specific/h6a4nca/
2021-07-24 07:44:26 -04:00
Raymond Hill
51d14de44a
Fix handling of some procedural cosmetic filters with explicit :scope
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1011#issuecomment-884806241
2021-07-23 10:11:07 -04:00
Raymond Hill
cd237ed3e1
Fix rendering of punycoded hostname in popup panel
Regression from:
- 75deadd31e
2021-07-20 11:22:33 -04:00
Raymond Hill
75deadd31e
Provide visual cue in popup panel when base domain has subdomains
Related issue:
- https://github.com/gorhill/uBlock/issues/284
2021-07-20 08:37:05 -04:00
Raymond Hill
e85c6f2d3e
Merge background changes to user filters in "My filters" pane
Related issue:
- https://github.com/gorhill/uBlock/issues/3704
2021-07-17 12:03:56 -04:00
Raymond Hill
e3f8a612f4
Minor code review 2021-07-16 14:06:59 -04:00
Raymond Hill
ec7db30b2f
Simplify fetching title of tabs
The title of tabs in uBO is solely to have a better
presentation in the logger -- no other purpose.

This commit simplify keeping track of the titles, from
an active approach by directly querying it from tabs
whenever a change occurs, to a passive approach by
storing it when the title string become available in
some tab event handlers.
2021-07-16 08:59:30 -04:00
Raymond Hill
bbdb68a2b6
Synthesize missing expected onCreatedNavigationTarget events
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1659

This commit introduces a workaround for missing
onCreatedNavigationTarget() in Chromium.
2021-07-15 11:34:37 -04:00
Raymond Hill
e03bb99f57
Add neutered replacement script for mixpanel
Related discussion:
- https://www.reddit.com/r/uBlockOrigin/comments/oicch9/

The new replacement script contains the smallest API
possible to resolve the reported case.

Please report instances where it's not sufficient to
unbreak a site, in which case I will extend the neutered
API to address these cases on an on-demand basis.
2021-07-13 07:58:31 -04:00
Raymond Hill
9a60573abe
Fix broken "Block element..." case when cosmetic filtering is off
Related feedback:
- e983f9a76e (commitcomment-53382148)
2021-07-12 18:32:32 -04:00
Raymond Hill
e983f9a76e
Disable creation of cosmetic filters in picker when unenforceable
Related issue:
- https://github.com/gorhill/uBlock/issues/3212

The element picker will now properly work on sites where
cosmetic filtering is disabled, but will not allow the
creation of cosmetic filters when specific cosmetic filters
are not meant to be enforced in the current page.

When specific cosmetic filters are not meant to be enforced,
the element picker will still allow the creation of network
filters, that is unless the current page is trusted, in which
case using the element picker is pointless.
2021-07-12 11:55:58 -04:00
Raymond Hill
f1a453d349
Avoid pointless check of doc id, presence of doc origin is what matter
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1657
2021-07-12 11:26:25 -04:00
Raymond Hill
717d8593c5
Improve the logger accuracy regarding matched part of the URL
Related issue:
- https://github.com/gorhill/uBlock/issues/3037

This takes care of the specific case reported. There are
other edge cases which are likely not addressed though, i.e.
those involving wildcards -- those should be rather rare and
at this point I rather leave them unaddressed to not
risk regressions (as they are less trivial to address).
2021-07-11 10:11:26 -04:00
Raymond Hill
27c633e054
Better handle negated behhvior types
Related issue:
- https://github.com/gorhill/uBlock/issues/2385
2021-07-10 16:35:52 -04:00
Raymond Hill
ed5dd0a791
Use location.replace() to modify URL of embedded frame
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1648
2021-07-10 09:56:36 -04:00
Raymond Hill
b75921c2fd
Limit recursion when parsing URL in document-blocked page
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1649
2021-07-06 10:13:50 -04:00
Raymond Hill
4422c42788
Discard network filters containing invalid pattern characters
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1146
2021-06-26 12:12:25 -04:00
Raymond Hill
b41463d437
Skip handling non-media elements 2021-06-25 07:24:00 -04:00
Raymond Hill
163035dc92
Drop the v from build version 2021-06-25 07:18:11 -04:00
Raymond Hill
14076fe8c0
Take care of misreporting spurious filter syntax error
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1596
2021-06-24 11:48:27 -04:00
Raymond Hill
81521256e7
Exclude trusted sites from no-popups-switch
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1616
2021-06-24 11:02:06 -04:00
Raymond Hill
ad15a5dd51
Map csp_report to other
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1622
2021-06-24 08:09:18 -04:00
Raymond Hill
090614dd18
Use firstElementChild instead of childElementCount
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1620

Related bugzilla issue:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1715841
2021-06-17 09:58:18 -04:00
Raymond Hill
8877ea290e
Do not redirect when no query parameters are removed
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1626
2021-06-12 13:26:21 -04:00
Raymond Hill
32bd47f053
Force restart at first install for Chromium-based browsers
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1547

The approach used to fix the issue was confirmed working
in the following related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1608#issuecomment-856282345
2021-06-12 09:18:56 -04:00
Raymond Hill
eb519b2ec1
Ensure version changes are persisted at launch 2021-06-02 07:07:10 -04:00
Raymond Hill
37ad821018
Fix loss of newlines when processing pre-parsing directives
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1603
2021-05-26 07:51:10 -04:00
Raymond Hill
7508700892
Prevent unchecked default lists from being visually collapsed
Related issue:
- https://github.com/gorhill/uBlock/issues/2303
2021-05-19 09:34:46 -04:00
Raymond Hill
8cd2a1d263
Make googletagmanager_gtm.js an alias of google-analytics_analytics.js
Related feedback:
- https://ilakovac.com/teespring-ublock-issue/

The surrogate script googletagmanager_gtm.js was essentially a
subset of surrogate script google-analytics_analytics.js. This
commit makes it a plain alias so that the whole GA API -- often
expected by clients of GTM -- is properly stubbed.
2021-05-18 11:08:20 -04:00
Raymond Hill
3fa7316062
Minor code review
Related commit:
- a24e2a5d6c
2021-05-16 08:16:13 -04:00
Raymond Hill
a24e2a5d6c
Fix management of reload button in popup panel
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1461
2021-05-15 10:45:31 -04:00
Raymond Hill
001094580c
Allow filter list subscription through context menu
Related issue/feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/763#issuecomment-841582704
2021-05-15 08:15:57 -04:00
Raymond Hill
d0e4c60f59
Keep reporting last time "out of date" lists were updated 2021-05-09 11:53:26 -04:00
Raymond Hill
1f8a67f40e
Fix improper hashing of rules in classic popup panel
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/n5vaih/
2021-05-09 11:41:23 -04:00
Raymond Hill
fca4db8021
Better handle network error when fetching sublist
Reported internally:

> STR --
>
> Import https://cdn.statically.io/gh/uBlockOrigin/uAssets/master/filters/filters.txt
> as a Custom filter list.
>
> Observe the filter count at 24K instead of true count
> being 29K.
>
> Force updating is sometimes compiling 24K filters and
> on subsequent updates 29K, so I narrowed it down to
> this host.

Findings:

One of the sublists was erroring when being fetched on
this particular CDN server (reason unknown).

uBO was not properly handling network errors when
fetching a sublist. This commit make it so that if
a sublist can't be fetched, then the error is propagated
as if it affected the whole list, in which case uBO will
use an alternative URL if any.
2021-04-29 08:32:32 -04:00
Raymond Hill
81fadf836f
Stop autoplay for unset media source with no-large-media-elements
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/mxgpmc/
2021-04-27 08:59:59 -04:00
Raymond Hill
2a5e67e3f5
Use CDN URLs as fall back URLs
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1566#issuecomment-826473517

Additionally, add more CDN URLs to default filter lists.
2021-04-27 08:56:07 -04:00
Raymond Hill
912bdce9cd
Normalize removeparam to removeparam, not queryprune 2021-04-16 08:59:57 -04:00
Raymond Hill
bc8c1d00ad
Remove advanced setting ignoreScriptInjectFilters
This advanced setting is not really needed, as the
same can be accomplished with a broad exception
filter such as `#@#+js()`.

Related feedback:
- f5b453fae3 (commitcomment-49499082)
2021-04-14 10:56:04 -04:00
Raymond Hill
58505cfddc
Finalize 3rd-party scripts/frames mini-filtering widget
For now the mini-filtering widget on 3rd-party scripts/frames
cells will allow to emphasize rows which have 3rd-party
scripts and/or frames.

Somewhat related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/210
2021-04-13 09:08:53 -04:00
Raymond Hill
f5b453fae3
Remove advanced setting ignoreScriptInjectFilters
Ever since the `redirect` code was refactored:

157cef6034

This advanced setting is no longer needed, as the same
can be accomplished with a plain network filter:

    @@*$redirect-rule
2021-04-13 08:49:10 -04:00
Raymond Hill
bfdc81e9e4
Ensure FLoC is opt-in by default
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1553

This commit ensures FLoC is opt-in. The generic filter
`*##+js(no-floc)` in "uBlock filters -- Privacy" ensures
the feature is disabled when using default settings/lists.

Users can opt-in to FLoC by adding a generic exception
filter to their custom filters, `#@#+js(no-floc)`; or they
can opt-in only for a specific set of websites through a
more specific exception filter:

    example.com,shopping.example#@#+js(no-floc)
2021-04-11 09:36:56 -04:00
Raymond Hill
9a94ba0a22
Fix regex used to extract attribute name in element picker
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/mh2ctv/
2021-03-31 12:21:29 -04:00
Raymond Hill
b1228f9d51
Add missing new JS file
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1527#issuecomment-798449462

Related commit:
- f876b68171
2021-03-13 09:38:29 -05:00
Raymond Hill
5e5bc24f63
Alphabetical order 2021-03-13 09:05:54 -05:00
Raymond Hill
f876b68171
Add support for removal of response headers
The syntax to remove response header is a special case
of HTML filtering, whereas the response headers are
targeted, rather than the response body:

  example.com##^responseheader(header-name)

Where `header-name` is the name of the header to
remove, and must always be lowercase.

The removal of response headers can only be applied to
document resources, i.e. main- or sub-frames.

Only a limited set of headers can be targeted for
removal:

  location
  refresh
  report-to
  set-cookie

This limitation is to ensure that uBO never lowers the
security profile of web pages, i.e. we wouldn't want to
remove `content-security-policy`.

Given that the header removal occurs at onHeaderReceived
time, this new ability works for all browsers.

The motivation for this new filtering ability is instance
of website using a `refresh` header to redirect a visitor
to an undesirable destination after a few seconds.
2021-03-13 08:53:34 -05:00
Raymond Hill
a01c03e11a
Fix no-scripting switch not working for SVG-based documents
Issue spotted while trying the following page:
- https://www.xul.fr/svgtetris.svg
2021-03-06 08:18:46 -05:00
Raymond Hill
9f063c717b
Also CSS-escape tag name in element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1519
2021-03-04 06:19:44 -05:00
Raymond Hill
404e6252d6
Fix regression causing exceptions to be thrown
Related commit:
- 1c3b45f75d

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1513
2021-03-03 10:51:56 -05:00
Raymond Hill
1c3b45f75d
Expose ability to toggle on/off cname-uncloaking to all users
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1513

Prior to this commit, the ability to enable/disable the
uncloaking of canonical names was only available to advanced
users. This commit make it so that the setting can be
toggled from the _Settings_ pane.

The setting is enabled by default. The documentation should
be clear that the setting should not be disabled unless it
actually solves serious network issues, for example:

https://bugzilla.mozilla.org/show_bug.cgi?id=1694404

Also, as a result, the advanced setting `cnameUncloak` is no
longer available from within the advanced settings editor.
2021-03-02 13:00:56 -05:00
Raymond Hill
972feae05d
Drop ctrl-key requirement in "Purge all caches" operation
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/lrcwii/memory_use_in_roaming_profile_in_windows/goq6h4n/
2021-02-26 06:48:26 -05:00
Raymond Hill
b7a2352c6f
Do not suggest network filters with wildcarded hostname in picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1494
2021-02-22 07:57:23 -05:00
Raymond Hill
918a073c81
Fix regression in strict blocking
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/lp6dwp/

Regression from:
- 3af1120082
2021-02-22 06:32:43 -05:00
Raymond Hill
266a7507b8
Fix regression when initializing popup panel
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1505

Regression from:
- 435c91636f
2021-02-21 07:41:09 -05:00
Raymond Hill
3565a0511e
Update comment
DOM logger and inspector are loaded on demand.
2021-02-20 07:05:19 -05:00
Raymond Hill
dfa1b64cae
Fix regression when reverting temporary rules in popup panel
Refression from:
- 435c91636f
2021-02-19 12:32:07 -05:00
Raymond Hill
3af1120082
Add support for exception of document to bypass strict-blocking
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1501

Exception filters for `document` option are complying with
uBO's own semantic for `document` option, i.e. an exception
filter for `document` option will only allow to bypass a
block filter for `document` (either explicit or implicit)
and nothing else.

Exception filters using `document` option are *not*
compatible with ABP's interpretation of these filters.
Whereas in ABP the purpose of a `document` exception filter
is to wholly disable content blocking, in uBO the same
filter will just cause strict-blocking to be disabled while
leaving content blocking intact.

Additionally, the logger was fixed to properly report pages
which are being strict-blocked.
2021-02-19 08:38:50 -05:00
Raymond Hill
96049f147e
Reflect latest changes in comment 2021-02-19 08:38:07 -05:00
Raymond Hill
9c3205b37c
Inject procedural cosmetic filterer's code only when needed
The procedural cosmetic filtering code has been split from
the content script code injected unconditionally and will
from now on be injected only when it is needed, i.e. when
there are procedural cosmetic filters to enforce.

The motivation for this is:
https://www.debugbear.com/blog/2020-chrome-extension-performance-report#what-can-extension-developers-do-to-keep-their-extensions-fast

Though uBO's content script injected unconditionally in all
pages/frames is relatively small, I still wanted to further
reduce the amount of content script code injected
unconditionally: The procedural cosmetic filtering code
represents roughly 14KB of code the browser won't have to
parse/execute unconditionally unless there exists procedural
cosmetic filters to enforce for a page or frame.

At the time the above article was published, the total
size of unconditional content scripts injected by uBO was
~101 KB, while after this commit, the total size will be
~57 KB (keeping in mind uBO does not minify and does not
remove comments from its JavaScript code).

Additionally, some refactoring on how user stylesheets are
injected so as to ensure that `:style`-based procedural
filters which are essentially declarative are injected
earlier along with plain, non-procedural cosmetic filters.
2021-02-17 09:12:00 -05:00
Raymond Hill
435c91636f
Count allowed/blocked requests for 3rd-party scripts/frames
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/210

Additionally, a small (experimental) widget has been added
to emphasize/de-emphasize rows which have 3rd-party
scripts/frames, so as to more easily identify which rows
are "affected" by 3rd-party scripts and/or frames.

Tooltip localization for the new widget is not available
yet as I want wait for the feature to be fully settled.
2021-02-15 06:52:31 -05:00
Raymond Hill
3bb73065e3
Fix broken forward compatibility re. imported lists
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1480

Forward compatiblity was broken due to `externalLists`
being converted into an Array from a string, i.e.
downgrading to uBO 1.32.4 was completely breaking uBO.

This commit restores `externalLists` as a string which
is what older versions of uBO expect.

A new property `importedLists` has been created to
hold the imported lists as an array, while
`externalLists` will be kept around for a while until
it is completely removed in some future.
2021-01-31 10:30:12 -05:00
Raymond Hill
0390bb8b8a
Fix potential spurious redirection in whitelisted tabless contexts
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1478
2021-01-30 15:08:21 -05:00
Raymond Hill
3101c5fa22
Upload non-filtered rules to cloud storage
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1472
2021-01-28 09:43:14 -05:00
Raymond Hill
40c145d76a
Fix handling of cname-aliased URLs in click-to-load widget
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1455
2021-01-22 09:37:12 -05:00
Raymond Hill
174731851e
Minor fine tuning of some default parameters 2021-01-21 08:40:10 -05:00
Raymond Hill
6eb1246508
Add userSettings entry to managed storage
The managed `userSettings` entry is an array of entries,
where each entry is a name/value pair encoded into an array
of strings.

The first item in the entry array is the name of a setting,
and the second item is the stringified value for the
setting.

This is a more convenient way for administrators to set
specific user settings. The settings set through
`userSettings` policy will always be set at uBO launch
time.
2021-01-16 10:35:56 -05:00
Raymond Hill
649b3480e0
Add "toOverwrite.filters" entry as managed storage property
The new entry is an array of strings, each representing a
distinct line, and all entries are used to populate the
"My filters" pane.

This offers an more straightforward way for administrators
to specify a list of custom filters to use for all
installations.
2021-01-10 12:31:31 -05:00
Raymond Hill
114012ae11
Add ability to lookup effective context from store of frames
Content scripts can't properly look up effective context
for sandboxed frames. This commit add ability to extract
effective context from already existing store of frames
used for each tab.
2021-01-10 11:56:27 -05:00
Raymond Hill
03e1b16961
Fix content script's broken context lookup from sandboxed anonymous frames 2021-01-08 13:12:48 -05:00
Raymond Hill
0e3071dd50
Add filterLists property to managed storage
The entry `toOverwrite.filterLists` is an array of
string, where each string is a token identifying a
stock filter list, or a URL for an external filter
list.

This new entry is to make it easier for an
administrator to centrally configure uBO with a
custom set of filter lists.
2021-01-08 09:18:26 -05:00
Raymond Hill
e4e7cbc78f
Use better identifying name for overview panel 2021-01-07 08:19:47 -05:00
Raymond Hill
1fcc3c6ddc
Add URL as tooltip 2021-01-07 08:19:02 -05:00
Raymond Hill
cc9c45f1e4
Adding to and further reviewing admin-managed settings 2021-01-06 11:39:24 -05:00
Raymond Hill
2ab11603f0
Allow everybody to use now-stable queryprune=
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/760
2021-01-06 11:17:07 -05:00
Raymond Hill
c1130ec843
Add support for admin-managed hidden settings
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1437#issuecomment-754127066
2021-01-05 12:16:50 -05:00
Raymond Hill
b28acfccbc
Add "extraTrustedSiteDirectives" as new admin policy
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1433

The new "extraTrustedSiteDirectives" policy is an array
of strings, each of which is parsed as a trusted-site
directive to append to a user's own set of trusted-site
directives at launch time.

The added trusted-site directives will be considered as
part of the default set of directives by uBO.
2021-01-04 07:54:24 -05:00
Raymond Hill
2bb33aac20
Be sure to use only a valid journal slot pointer
Related commit:
- 70cabc1cc6
2021-01-02 12:41:13 -05:00
Raymond Hill
752191a04f
Make sure journal slot pointers are properly reset
For when the same page store is recycled later.
2021-01-02 12:07:31 -05:00
Raymond Hill
70cabc1cc6
Better report secondary requests with quick redirections
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1241

uBO will not discard secondary requests fired before a root
frame is committed, by ensuring that if newly uncommitted
root frames are of the same origin as previous one(s), the
uncommited journal slot pointer is not updated.
2021-01-02 11:52:16 -05:00
Raymond Hill
c2357c5cd6
Just extract token from queryprune -- don't create pattern
Related commit:
- 6ac09a2856

Patternless `queryprune` ar enow preserved as being
pattern-less while still attempting to extract a token
from the `queryprune` value. This allows to report the
filter in the logger same as its original form.
2021-01-01 10:23:40 -05:00
Raymond Hill
1669d122df
Add resource for noop VMAP
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1425

The resource content is a copy/paste of AdGuard's code:
- bc5eec1989/src/redirects/static-redirects.yml (L134)
2020-12-29 09:05:28 -05:00
Raymond Hill
2e7f1b8d08
Improve validation of synctactically bad regexes
The following regex are not rejected as invalid when
using built-in regex objects:

    /abc]/
    /a7,18}/
    /a{7,18/

However, as per documentation, they are not supposed to
be valid, as `{` and `}` are special characters and as
such should be escaped:

    /abc\]/
    /a7,18\}/
    /a\{7,18/

With this commit, the regexes will additionally be
validated using the regex analyzer library in the editor
to ensure strict regex syntax compliance so as to avoid
what are likely mistakes in regex crafting by authors.
2020-12-28 07:13:57 -05:00
Raymond Hill
4ba3adc28c
Fix comment 2020-12-28 07:07:04 -05:00
Raymond Hill
d910111d4a
Fix parsing of trailing resource
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1419
2020-12-28 07:03:52 -05:00
Raymond Hill
6d3ad553b4
Fix word-based selection in filter list editor/viewer
This commit fixes mouse double-click-and-drag operations,
which was broken due to the implementation of a custom
word selection in the filter list editor/viewer.
2020-12-27 09:32:50 -05:00
Raymond Hill
b053477087
Fix potentially missing context in logger for popup entries
Reported internally.
2020-12-26 10:15:07 -05:00
Raymond Hill
426395aa03
Improve extraction of tokens from regex-based filters
Regex-based static network filters are those most likely to
cause performance degradation, and as such the best guard
against undue performance degradation caused by regex-based
filters is the ability to extract valid and good tokens
from regex patterns.

This commit introduces a complete regex parser so that the
static network filtering engine can now safely extract
tokens regardless of the complexity of the regex pattern.

The regex parser is a library imported from:
https://github.com/foo123/RegexAnalyzer

The syntax highlighter adds an underline to regex-based
filters as a visual aid to filter authors so as to avoid
mistakenly creating regex-based filters. This commit
further colors the underline as a warning when a regex-based
filter is found to be untokenizable.

Filter list authors are invited to spot these untokenizable
regex-based filters in their lists to verify that no
mistake were made for those filters, causing them to be
untokenizabke. For example, what appears to be a mistake:

    /^https?:\/\/.*\/sw.js?.[a-zA-Z0-9%]{50,}/

Though the mistake is minor, the regex-based filter above
is untokenizable as a result, and become tokenizable when
the `.` is properly escaped:

    /^https?:\/\/.*\/sw\.js?.[a-zA-Z0-9%]{50,}/

Filter list authors can use this search expression in the
asset viewer to find instances of regex-based filters:

    /^(@@)?\/[^\n]+\/(\$|$)/
2020-12-26 08:52:42 -05:00
Raymond Hill
596f085fa5
Allow default word selection when not using better selection
Double-click in editor will just fall back to default word
selection when NOT using enhanced word selection.
2020-12-24 08:34:45 -05:00
Raymond Hill
1c37e29e0a
Fix handling of fragment when applying queryprune
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1415
2020-12-24 07:35:26 -05:00
Raymond Hill
ea71e93c81
Reset Chromium-specific color-scheme CSS property
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1408
2020-12-21 09:20:56 -05:00
Raymond Hill
187f1831f0
Allow more local resources to be redirected as data: URIs
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1388#issuecomment-748625280
2020-12-20 11:54:24 -05:00
Raymond Hill
990cff576d
Fix case of scriptlet injection not working about: frames
This is an issue in uBO affecting only Chromium-based browsers.

Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/688#issuecomment-748179731
2020-12-18 12:07:08 -05:00
Raymond Hill
a307cf5e6a
Mind restore-from-backup for no-csp-reports rule
Related commit:
- 7d90f97aa1
2020-12-17 08:12:06 -05:00
Raymond Hill
bc9b8a1330
Enable broad no-csp-reports rule only in Firefox
Related commit:
- 7d90f97aa1
2020-12-16 07:02:55 -05:00
Raymond Hill
89cac090a4
Mind important only for valid redirect tokens
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1366#issuecomment-745744824
2020-12-16 06:55:46 -05:00
Raymond Hill
a090b2b564
Fix auto-completion for epicker in Firefox 2020-12-15 09:38:20 -05:00
Raymond Hill
0052dc123b
Fix no-csp-reports default enabled switch state
Related feedback:
- 7d90f97aa1 (commitcomment-45138096)
2020-12-15 09:36:04 -05:00
Raymond Hill
e28c2cc3c6
Auto-complete of origin pattern for ||-based patterns
Related commit:
- daf464b3c3
2020-12-15 08:27:59 -05:00
Raymond Hill
8060ddb283
Avoid duplicates in editor's auto-completion of origins
Related commit:
- daf464b3c3
2020-12-14 11:26:04 -05:00
Raymond Hill
b22cf24bd5
Fix look-up of specific-generic filters entity-less hostnames
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/688#issuecomment-743755956
2020-12-14 11:22:08 -05:00