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

3217 Commits

Author SHA1 Message Date
Raymond Hill
6e010ecc0f
Prevent set-constant properties from being overtaken
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/156#issuecomment-707095193

Additionally, while investigating the issue I removed
code which is no longer needed since content scripts
are now injected in `about:blank` frames since 1.29.0.
2020-10-12 10:08:51 -04:00
Raymond Hill
1727585faa
Hightlight to warn about unknown redirect tokens
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1134
2020-10-11 08:59:44 -04:00
Raymond Hill
6ff72af4aa
Only URLs in comments can be selected through double-click 2020-10-11 07:45:58 -04:00
Raymond Hill
376ef4645f
Fine tune click-to-load visual 2020-10-11 07:45:16 -04:00
Raymond Hill
2e5d32e967
Fine tune code related to click-to-load feature
The redirectable resource has been renamed
`click2load.html`, so as to avoid uses of dash
characters and to also allow for future different
click-to-load resources.
2020-10-10 08:36:30 -04:00
Raymond Hill
5916920985
Add support for click-to-load of embedded frames
Additionally, as a requirement to support click-to-load
feature, redirected resources will from now on no
longer be collapsed.

Related issues:
- https://github.com/gorhill/uBlock/issues/2688
- https://github.com/gorhill/uBlock/issues/3619
- https://github.com/gorhill/uBlock/issues/1899

This new feature should considered in its draft
stage and it needs to be fine-tuned as per
feedback.

Important: Only embedded frames can be converted
into click-to-load widgets, as only these can be
properly shieded from access by page content.

Examples of usage:

    ||youtube.com/embed/$3p,frame,redirect=clicktoload
    ||scribd.com/embeds/$3p,frame,redirect=clicktoload
    ||player.vimeo.com/video/$3p,frame,redirect=clicktoload
2020-10-09 13:50:54 -04:00
Raymond Hill
ba0b62ec97
Update to more accurate explanation 2020-10-08 10:15:33 -04:00
Raymond Hill
c3f267db8f
Improve bad filter detection in element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1280
2020-10-08 09:49:35 -04:00
Raymond Hill
4f00c08f6b
Fix detection of already present comment
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1281

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1281#issuecomment-705081202
2020-10-07 14:23:57 -04:00
Raymond Hill
46ec969411
Add ability to use full URL in auto-generated comment
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1281

New supported placeholder: `{{url}}`, which will be
replaced by the full URL of the page for which a filter
is created.
2020-10-07 11:52:38 -04:00
Raymond Hill
bfe5e2daa1
Limit width of picker dialog in large viewport 2020-10-07 11:04:16 -04:00
Raymond Hill
04b11b4311
Fix restore backup feature
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1282
2020-10-06 21:02:51 -04:00
Raymond Hill
778338fce8
Fix picker generating overly long candidate cosmetic filters
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/j5tx8x/understand_the_element_blocker_and_feedback/g7wf2q9/

Regression from:
- https://github.com/gorhill/uBlock/commit/9eb455ab5eb2
2020-10-06 17:26:28 -04:00
Raymond Hill
57048d57b2
Reject improper use of procedural operator in selector list
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/382#issuecomment-703725346
2020-10-06 12:39:05 -04:00
Raymond Hill
aff75b3527
Fix typo breaking the collapsing of placeholders
Related issue:
- https://github.com/gorhill/uBlock/issues/2848
2020-10-05 14:20:43 -04:00
Raymond Hill
fc0b5e4ef1
Link to the "My filters" wiki page
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1279#issuecomment-703700929
2020-10-05 11:38:30 -04:00
Raymond Hill
d97c46ffd3
Use a user stylesheet to implement the collapsing of placeholders
Related issue:
- https://github.com/gorhill/uBlock/issues/2848
2020-10-05 09:13:07 -04:00
Raymond Hill
f4aebc9390
Backup/restore only modified advanced settings
This reduces the size of the backup file and also
ensures that default values can be changed.
2020-10-03 12:34:21 -04:00
Raymond Hill
e3a6d8465f
Add advanced setting to force a light/dark theme
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/401#issuecomment-703075797

Name: `uiTheme`
Default: `unset`
Values:
- `unset`: uBO will pick the theme according to
  browser's `prefers-color-scheme`
- `light`: force light scheme
- `dark`: force dark theme

This advanced setting is not to be documented yet as
it has not been decided this is a long term solution.
2020-10-03 07:13:40 -04:00
Raymond Hill
b179dc0268
Add more CSS variables for theming
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/401
2020-10-03 06:00:48 -04:00
Raymond Hill
266a170beb
Add more CSS variables in preparation of dark mode support
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/401
2020-10-02 12:18:13 -04:00
Raymond Hill
303240c713
Minor changes to dark theme
A whole lot more work needed across all of uBO's user
interface.
2020-10-01 10:09:59 -04:00
jeremyperkin
fba5f3d597
Update default.css
- Added values for dark mode
- Using the photon colors and reviewing material design - Put this together.
- Correct fieldset-header-ink
- Removed color variables already listed.
- Removal of !important and revert to some already approved colours.

Signed-off-by: Raymond Hill <rhill@raymondhill.net>
2020-09-30 12:34:52 -04:00
Raymond Hill
68ac096b39
Import translation work from https://crowdin.com/project/ublock 2020-09-30 10:23:08 -04:00
Raymond Hill
fef375a594
Minor improvements to syntax highlight of static filters
Double-cliking on a URL will cause the whole URL to be
selected, thus making it easier to navigate to this
URL (through your browser "Open in new tab" entry in
contextual menu).

Unrecognized scriptlet names will be highlighted so as
to warn that the filter is not going to be effective.
2020-09-30 10:01:10 -04:00
Raymond Hill
3edec25be0
Import translation work from https://crowdin.com/project/ublock 2020-09-24 10:57:51 -04:00
Raymond Hill
15e0778750
Prevent spurious instantiation of procedural filterer
Injecting declarative CSS `:style()` selector could cause
the instatiation of the procedural filterer, even when
there was no actual procedural cosmetic filter to
enforce.

This commit ensure that the procedural cosmetic filterer
is instantiated only when there are actual procedural
filters to enforce.
2020-09-24 10:53:18 -04:00
Raymond Hill
5df51d63d1
Do not syntax-highlight ... in "My rules" pane 2020-09-23 11:14:09 -04:00
Raymond Hill
42193838a8
Import translation work from https://crowdin.com/project/ublock 2020-09-22 10:09:35 -04:00
Raymond Hill
99f605d28a
Minor code review of subscriber scriptlet 2020-09-21 07:25:24 -04:00
Raymond Hill
1cdffea618
Allow customization of some popup panel CSS properties
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1254

The advanced setting `uiStyles`[1] can be used to control
the minimum width of both the main and firewall panes
in the popup panel:

- `--popup-main-min-width`, default to `18em`
- `--popup-firewall-min-width`, default to `30em`

* * *

[1] https://github.com/gorhill/uBlock/wiki/Advanced-settings#uistyles
2020-09-21 07:18:11 -04:00
Raymond Hill
b3b2fc3b42
Remove unused property 2020-09-20 09:29:17 -04:00
Raymond Hill
7464294b83
Import translation work from https://crowdin.com/project/ublock 2020-09-20 09:25:24 -04:00
Raymond Hill
6b15e8c423
Fix highlighting of good/bad hostnames in "My rules" pane
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1249#issuecomment-695755743
2020-09-20 08:58:04 -04:00
Raymond Hill
7067ee904d
Import translation work from https://crowdin.com/project/ublock 2020-09-19 10:05:12 -04:00
Raymond Hill
c181ab2911
Fix ability to set temporary cosmetic filter exceptions
Regression from:
- 35aefed926
2020-09-19 10:00:21 -04:00
Raymond Hill
df42011345
Import translation work from https://crowdin.com/project/ublock 2020-09-18 10:30:55 -04:00
Raymond Hill
3f299ef623
Improve validation of hostname in domain= and denyallow options
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1249

For "exotic" hostname values, the browser's own API will be
used to ultimately validate hostname values.
2020-09-18 10:23:02 -04:00
Raymond Hill
7ed543db0d
Fine tune visual of slider widgets in element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/851
2020-09-16 07:01:16 -04:00
Raymond Hill
ec6ab74356
Import translation work from https://crowdin.com/project/ublock 2020-09-16 07:00:47 -04:00
Raymond Hill
328d6a09f4
Fix broken styling of selectors with pseudo elements
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/382

Additionally, fix minor parsing issues with AdGuard's
cosmetic filters.
2020-09-14 14:58:25 -04:00
Raymond Hill
d292c72a5a
Import translation work from https://crowdin.com/project/ublock 2020-09-14 08:48:37 -04:00
Raymond Hill
fe9797cacc
Add easylist.to as a valid target for subscriber content script 2020-09-14 08:43:51 -04:00
Raymond Hill
714f07dc25
Work around instances of over-encoded subscription URLs
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/763#issuecomment-691696716
2020-09-13 13:41:25 -04:00
Raymond Hill
426655eb25
Import translation work from https://crowdin.com/project/ublock 2020-09-13 11:49:57 -04:00
Raymond Hill
4c7635514a
Fine tuning changes to click-to-subscribe code
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/763#issuecomment-691682195

Additionally, enable an existing subscription when
subscribing again to it.
2020-09-13 11:44:42 -04:00
Raymond Hill
075d39828f
Import translation work from https://crowdin.com/project/ublock 2020-09-13 08:18:58 -04:00
Raymond Hill
e60042595c
Revisit the behavior of the click-to-subscribe content script
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/763

Changes:

From now on, uBO will allow click-to-subscribe on only
a few select domains, currently:
- https://filterlists.com/
- https://github.com/
- https://github.io/

More domains can be added if and only the demonstration
is made that more than a marginal number of filter lists
can be subscribed from those domains.

The browser alert box is no longer used to confirm
subscription to a filter list. Instead, the asset
viewer has been expanded to serve that purpose. This
way, users can peruse at the content of a filter list
before subscribing to it.
2020-09-13 08:01:53 -04:00
Raymond Hill
da7ff2b382
Remove now pointless use of important in CSS styles
Now that the element picker user interface is isolated
frompage content world, there is no need to use the
`important` modifier for the element picker's own
CSS styles.
2020-09-12 11:36:30 -04:00
Raymond Hill
05893a6c16
Fix swipe right to exit zapper/picker on touch displays
Regression from:
- d23f9c6a8b
2020-09-12 11:29:39 -04:00
Raymond Hill
218f774ba0
Fix broken localized string in some languages
Reported as feedback at:
- https://crowdin.com/translate/ublock
2020-09-12 10:37:08 -04:00
Raymond Hill
b73b24ebb1
Fix slider's responsiveness to layout changes
Related commit:
- f01bda1159
2020-09-12 08:26:44 -04:00
Raymond Hill
f01bda1159
Rework visuals of element picker sliders
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/851
2020-09-12 07:28:46 -04:00
Raymond Hill
ead49e083a
Fix delete key handling in element zapper
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1237#issuecomment-690897502
2020-09-11 08:12:45 -04:00
Raymond Hill
f0ef680a86
Remove pointless test for parent node presence
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1240
2020-09-11 07:58:01 -04:00
Raymond Hill
df83a0847f
Forgot to commit last minute changes in element picker
Related commit:
- 260f762c83
2020-09-10 10:40:07 -04:00
Raymond Hill
6fd6f7f26b
Import translation work from https://crowdin.com/project/ublock 2020-09-10 10:39:30 -04:00
Raymond Hill
260f762c83
Add widget to control selector depth to element picker
Further iterating on the work done in following commit:
- 1268f0ae43

This commit adds a new widget to the element picker to
control the depth of a cosmetic filter selector. The
new widget is essentially just another way of selecting
the depth, which is still controllable through picking
one of the cosmetic filters in the list of candidates.
2020-09-10 10:32:53 -04:00
Raymond Hill
6f7801d433
Fix zapper not being able to remove SVG elements
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1237
2020-09-09 10:51:30 -04:00
Raymond Hill
d4182add6e
Add ability to outright remove/ignore "really bad lists"
In addition to what is deemed really bad lists by consensus,
some lists will also be labelled "really bad list"
temporarily so as to force-remove them from the set of
filter lists.

This will be the case for filter lists which are not
necessarily "bad lists" but which were once part of
uBO's stock filter lists and have been removed since
then for various reasons.

This will ensure that the majority of users who do not
modifies uBO's default listset will still have a
configuration which matches the official default listset.
2020-09-09 09:57:29 -04:00
Raymond Hill
1268f0ae43
Add element picker widget to control specificity
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/851

The ctrl key is no longer used to adjust specificity of
a candidate filter.

A new widget has been added to adjust the specificity of
a candidate filter to various level. The widget will be
visible as long as the candidate filter matches one entry
in the list of suggested candidate cosmetic filters.
2020-09-09 09:27:53 -04:00
Raymond Hill
1d723f990e
Import translation work from https://crowdin.com/project/ublock 2020-09-07 08:41:37 -04:00
Raymond Hill
35aefed926
Add support to chain :style() to procedural operators
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/382

Additionally, remnant code for pseudo-user stylesheets
has been removed. Related commit:
- 5c68867b92
2020-09-07 08:28:01 -04:00
Raymond Hill
4ce3ff2e04
Remove code for unused message 2020-09-03 10:56:29 -04:00
Raymond Hill
d23f9c6a8b
Isolate element picker's svg layers from page content
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1226

Related commit:
- 9eb455ab5e

In the previous commit, the element picker dialog was
isolated from the page content. This commit is to also
isolate the svg layers from the page content.

With this commit, there is no longer a need for an anonymous
iframe and the isolated world iframe is now directly
embedded in the page.

As a result, pages are now unable to interfere with any
of the element picker user interface. Pages can now only
see an iframe, but are unable to see the content of that
iframe. The styles applied to the iframe are from a user
stylesheet, so as to ensure pages can't override the
iframe's style properties set by uBO.
2020-09-03 10:27:35 -04:00
Raymond Hill
9eb455ab5e
Isolate element picker dialog from page content world
Related issues:
- https://github.com/gorhill/uBlock/issues/3497
- https://github.com/uBlockOrigin/uBlock-issues/issues/1215

To solve above issues, the element picker's dialog is now
isolated from the page content in which it is embedded.

The highly interactive, mouse-driven part of the element
picker is still visible by the page content.
2020-09-01 12:32:12 -04:00
Raymond Hill
43dba2bd0e
StaticFilteringParser.analyzeExtra() has no argument 2020-09-01 09:57:38 -04:00
Raymond Hill
90743532f1
Add missing colon 2020-09-01 09:52:44 -04:00
Raymond Hill
db008f45dc
Import translation work from https://crowdin.com/project/ublock 2020-08-30 07:56:11 -04:00
Raymond Hill
3bbed7be33
Do not use letter-spacing for non-bolded text
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1044#issuecomment-682920219
2020-08-29 08:32:40 -04:00
Raymond Hill
1369b137d5
Import translation work from https://crowdin.com/project/ublock 2020-08-28 15:34:14 -04:00
Raymond Hill
d2195b4246
Fix rule sorting quirk in "My rules" pane
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1055
2020-08-27 07:04:37 -04:00
Raymond Hill
45cce88d8b
Import translation work from https://crowdin.com/project/ublock 2020-08-27 06:41:58 -04:00
Raymond Hill
ef62398fd9
Add translations for ne wsort widget in "My rules"
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1055
2020-08-27 06:36:29 -04:00
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
51ab3e6c52
Fix misaligned label 2020-08-25 13:46:36 -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
e33642da66
Import translation work from https://crowdin.com/project/ublock 2020-08-22 09:07:20 -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
b98b2fc52b
Slightly improve nowoif scriptlet
Returns proxied self is no window object can
be returned.
2020-08-18 10:28:45 -04:00
Raymond Hill
cb6486859c
Further fine tune nowoif scriptlet 2020-08-18 09:11:40 -04:00
Raymond Hill
d544543ab5
Add argument to nowoif scriptlet
When a 3rd argument was provided, the scriplet would
log information related to window popup operations,
regardless of the value of the argument.

The 3rd argument is now parsed in a formal manner. It
is meant to be one or more space-separated tokens which
are used to fine tune the behavior of the scriptlet.

Tokens:

log:
  Cause the scriptlet to log information regarding
  how window.open() is used by the page on which the
  scriptlet is used. Useful only to filter creators.

obj:
  Use an `object` element instead of `iframe` element
  (default) as a decoy to be used in place of a popup
  window, when the page requires a valid `window`
  instance to be returned.
2020-08-17 09:47:40 -04:00
Raymond Hill
b33065e198
Fine tune nowoif scriptlet 2020-08-16 17:14:26 -04:00
Raymond Hill
a546a5e1ba
Fix typo 2020-08-16 13:24:10 -04:00
Raymond Hill
071b15cf94
Improve nowoif scriptlet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/ 6019
2020-08-16 13:18:40 -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
6dca8969b0
Revert latest changes
Related commit:
- d39b6d058a
- 94650e260e
2020-08-16 06:03:34 -04:00
Raymond Hill
d39b6d058a
Fix cases of illegal invocation with nowoif 2020-08-15 10:31:48 -04:00
Raymond Hill
0435257c16
Be sure pageStoreFromTabId() is defined before message handlers 2020-08-14 15:32:08 -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
ba833d3391
Use EasyList as nominal reference for filter creation 2020-08-14 10:15:14 -04:00
Raymond Hill
94650e260e
Fix nowoif decoy
Related issue:
- https://github[.]com/uBlockOrigin/uAssets/issues/6019
2020-08-14 09:52:20 -04:00