Commit graph

2403 commits

Author SHA1 Message Date
Raymond Hill
2fb4dc8358
Update PSL library to latest official version 2019-02-12 12:00:20 -05:00
Raymond Hill
1e2969c3b0
Update PSL library to last version 2019-02-12 07:59:38 -05:00
Raymond Hill
0c976992ba
Import translation work from https://crowdin.com/project/ublock 2019-02-10 12:26:48 -05:00
Raymond Hill
4da340384a
Update publicSuffixLibrary to latest (WASM-able) version
See https://github.com/gorhill/publicsuffixlist.js
2019-02-10 12:19:05 -05:00
Raymond Hill
29b10d2151
Tone down logger visual for tab-less network requests 2019-02-05 12:05:00 -05:00
Raymond Hill
d432f78b66
Import translation work from https://crowdin.com/project/ublock 2019-02-05 07:04:52 -05:00
Raymond Hill
4c428edeef
Import translation work from https://crowdin.com/project/ublock 2019-02-02 08:14:47 -05:00
Raymond Hill
656203adc7
Minor generic code review of changes since 1.18.2 2019-02-02 08:09:34 -05:00
Raymond Hill
fc03782985
Ensure that WASM module was actually loaded 2019-02-01 09:09:51 -05:00
Raymond Hill
ff269d793d
Use indexedDB instead of for cacheStorageAPI value 2019-02-01 08:27:28 -05:00
Raymond Hill
69c87c5117
Fix Promise chain of WASM module load operations
The Promise chain was not properly designed for WASM module
loading. This became apparent when removing WASM modules
from Opera build[1].

The problem was that errors thrown by fetch() -- used to
load WASM modules -- were not properly handled.

[1] Opera refuses updating uBO if there are unrecognized file
types in the package, and `.wasm`/`.wat` files are not
recognized by Opera uploader.
2019-02-01 08:20:43 -05:00
Raymond Hill
923c5ce5bd
Compute URL of sublists as relative to URL of parent list
Related issue:
- https://github.com/NanoAdblocker/NanoCore/issues/239

The erroneous behavior was to compute the URL of a sublist as
relative to the URL of the root list, which may differ from the
URL of a parent list.
2019-01-29 11:52:16 -05:00
Raymond Hill
3195f554f7
Fix partyness evaluation for cases of base domain-less hostnames
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/402
2019-01-29 10:34:58 -05:00
Raymond Hill
98307e07cb
Import translation work from https://crowdin.com/project/ublock 2019-01-28 16:22:41 -05:00
Raymond Hill
d7c169c587
Import translation work from https://crowdin.com/project/ublock 2019-01-27 17:24:26 -05:00
Raymond Hill
15100459b3
Harden content script's message Port against spurious disconnections
Those spurious disconnections have been observed to occur at
uBO's launch time.

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/403

I have observed that this fixes an issue observed on Firefox 64
(current stable).

The reported Waterfox issue *may* be fixed as a result. If not,
the issue he still considered fixed as Waterfox is not
officially supported.
2019-01-27 17:07:40 -05:00
Raymond Hill
85d6339b07
Code review for a026e9ae54: no need to be so flexible 2019-01-25 18:58:49 -05:00
Raymond Hill
a026e9ae54
Fix reverting use of IndexedDB as default cache storage on Chromium
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/399

The advanced setting `cacheStorageAPI` has been added to allow
a user to force the use of IndexedDB as cache storage. Set to
`IndexedDB` to force use of IndexedDB. Default to `unset`.
2019-01-25 18:49:30 -05:00
Raymond Hill
185ebf0d7d
Import translation work from https://crowdin.com/project/ublock 2019-01-25 08:47:39 -05:00
Raymond Hill
ba7baec1f4
Import translation work from https://crowdin.com/project/ublock 2019-01-24 07:06:43 -05:00
Raymond Hill
b214ec1bae
Ensure pointer-events style is set to auto at element picker launch
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/393
2019-01-23 17:11:07 -05:00
Raymond Hill
be76714cfc
Import translation work from https://crowdin.com/project/ublock 2019-01-22 06:53:09 -05:00
Raymond Hill
9e89dd4f26
Fix missing partyness in logger when empty domain in resource URL 2019-01-22 06:13:30 -05:00
Raymond Hill
a668893427
Import translation work from https://crowdin.com/project/ublock 2019-01-21 12:18:10 -05:00
Raymond Hill
64e0498084
Import translation work from https://crowdin.com/project/ublock 2019-01-20 12:35:25 -05:00
Raymond Hill
16a0ebbfb0
Import translation work from https://crowdin.com/project/ublock 2019-01-19 09:09:37 -05:00
Raymond Hill
1de821d99b
Apply stricter rejection of usage of url() in :style rules 2019-01-18 19:07:31 -05:00
Raymond Hill
6d19c4be88
Import translation work from https://crowdin.com/project/ublock 2019-01-18 06:57:47 -05:00
Raymond Hill
ff6991c292
Import translation work from https://crowdin.com/project/ublock 2019-01-17 15:54:43 -05:00
Raymond Hill
52526b74d9
Minor visual change to logger 2019-01-17 15:49:18 -05:00
Raymond Hill
299afacd99
Import translation work from https://crowdin.com/project/ublock 2019-01-17 08:07:24 -05:00
Raymond Hill
4df8e9be41
Add logger "Export"-related strings for i18n 2019-01-17 08:03:50 -05:00
Raymond Hill
801eb43572
Prevent info entries from polluting logger output
These entries are meant to be shown only when using "All"
mode, not when the output is narrowed to a specific tab.
2019-01-16 13:29:34 -05:00
Raymond Hill
0c80994124
Fine tune visuals in logger's export-to-clipboard dialog 2019-01-16 12:02:16 -05:00
Raymond Hill
5f341e02ed
Import translation work from https://crowdin.com/project/ublock 2019-01-16 07:32:18 -05:00
Raymond Hill
e8ff6a2abf
Prevent sites from disabling mouse events for element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/380

Previous fix was incorrect:
84818fcd84

Additionally, I fixed the "Network filters" or "Cosmetic filters"
sections not being properly hidden when there was not valid
filters found.
2019-01-15 16:34:57 -05:00
Raymond Hill
86e5d0384c
Fix minor logger quirks as per feedback 2019-01-15 15:12:47 -05:00
Raymond Hill
84818fcd84
Prevent sites from disabling mouse events for the element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/380
2019-01-15 14:41:23 -05:00
Raymond Hill
0b73808bf7
Import translation work from https://crowdin.com/project/ublock 2019-01-15 08:42:28 -05:00
Raymond Hill
3b206fd224
Put back 'Static filter' instead of just 'Filter' 2019-01-15 08:32:39 -05:00
Raymond Hill
b0fb6d678d
Fix regression from 0edf53f508 (diff-a51c8c4aedf62ea9aec5e71f3b1427c3R624) 2019-01-15 08:18:45 -05:00
Raymond Hill
5d5b05b387
Fix an issue in new logger export feature
Specifically, if selecting table+markdown, the export dialog
would no longer be accessible once closed.
2019-01-14 16:52:13 -05:00
Raymond Hill
ac5bae6a65
Import translation work from https://crowdin.com/project/ublock 2019-01-14 15:10:28 -05:00
Raymond Hill
0edf53f508
Add export-to-clipboard feature to logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/334

Additionally, a number of smallish issues following
refactoring of the logger code were addressed.
2019-01-14 14:57:31 -05:00
Raymond Hill
88a54d442d
Import translation work from https://crowdin.com/project/ublock 2019-01-14 08:08:09 -05:00
Raymond Hill
3be59f172d
Use blocked/allowed colors in logger's "Details" pane
Additionally, another attempt at making the logger render
better on small-screen devices.
2019-01-13 08:34:17 -05:00
Raymond Hill
10f1fdcb7c
Import translation work from https://crowdin.com/project/ublock 2019-01-12 17:22:55 -05:00
Raymond Hill
9fd63bdbe6
Merge branch 'master' of github.com:gorhill/uBlock into nextdev 2019-01-12 17:06:07 -05:00
Raymond Hill
be0c7186a2
Import translation worl from https://crowdin.com/project/ublock 2019-01-12 17:05:41 -05:00
Raymond Hill
ed5d63df69
Grand refactoring of the logger
Performance-related work: the logger data has been decoupled
from the DOM -- inspired from CodeMirror's way of efficiently
handling large amout of text data.

This decoupling now makes the logger highly efficient CPU- and
memory-wise, and open the way to more possibilities.

Ability to configure some aspect of the logger behavior and
visuals:
- The hard-coded limit of 5000 entries has been
  removed and is now replaced with a variety of
  user-configurable settings to enforce the discarding of
  logger entries.
- Some columns in the logger output can now be hidden.

The filter list look-up feature has been merged into the
existing overlay dialog used to create URL rules or static
filters, as an entry in a new "Details" pane.

Other issues addressed during refactoring:
- https://github.com/uBlockOrigin/uBlock-issues/issues/280
- https://github.com/gorhill/uBlock/issues/1999

The minimum version supported on Firefox has been bumped
up to 55.0.
2019-01-12 16:36:20 -05:00
Raymond Hill
407aa68272
Merge branch 'master' of github.com:gorhill/uBlock into nextdev 2019-01-08 08:08:16 -05:00
Raymond Hill
f1f1892233
Import translation work from https://crowdin.com/project/ublock 2019-01-08 07:57:49 -05:00
Raymond Hill
64bea27881
Add ability to control auto-commenting at filter creation time
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/372
- https://github.com/gorhill/uBlock/issues/93

A new advanced settings has been added: `autoCommentFilterTemplate`.

Default value is `{{date}} {{origin}}`.

Placeholders are identified by `{{...}}`. There are currently
only three placeholders supported:

- `{{date}}`: will be replaced with current date
- `{{time}}`: will be replaced with current time
- `{{origin}}`: will be replaced with site information on which
  the filter(s) was created

If no placeholder is found in `autoCommentFilterTemplate`, this
will disable auto-commenting. So one can use `-` to disable
auto-commenting.

Additionally, if auto-commenting is enabled, uBO will not emit a
comment if an emitted comment would be a duplicate of the last
one found in the user filter list.
2019-01-08 07:37:50 -05:00
Raymond Hill
2c4535d1fe
Prevent spurious disappearance of built-in expression filters panel
After a bit more testing following
<38b73f7100>.

Hovering the mouse cursor over the margin area would cause the panel
to spuriously disappear.
2019-01-01 16:31:54 -05:00
Raymond Hill
dbca18ebe1
Expand built-in filter expression panel by default
In light of <38b73f7100>,
it makes sense to now have the panel expanded by default.
2019-01-01 16:31:38 -05:00
Raymond Hill
76eb3e9d03
Hide built-in expressions panel in logger when cursor leaves panel 2019-01-01 16:31:19 -05:00
Raymond Hill
24cb894aa0
Prevent spurious disappearance of built-in expression filters panel
After a bit more testing following
<38b73f7100>.

Hovering the mouse cursor over the margin area would cause the panel
to spuriously disappear.
2019-01-01 11:43:41 -05:00
Raymond Hill
0867a15d36
Expand built-in filter expression panel by default
In light of <38b73f7100>,
it makes sense to now have the panel expanded by default.
2019-01-01 11:34:24 -05:00
Raymond Hill
38b73f7100
Hide built-in expressions panel in logger when cursor leaves panel 2019-01-01 11:18:14 -05:00
Raymond Hill
d8674d8abe
Merge changes from master 2018-12-31 12:11:28 -05:00
Raymond Hill
08261e3c15
Change DOM surveyor to time-based processing logic (from chunk-based)
The DOM surveyor will now use time-based logic to spread its work
over time. This allows the surveying to better scale down on
slower devices.

Additionally, the DOM surveyor code has been reworked to lower as
much as possible memory churning when collating nodes to survey.

This rework has been motivated after profiling the "monstrous DOM"
seen in the following page:
<https://doc.rust-lang.org/std/iter/trait.Iterator.html>

The idea is that making the DOM surveyor efficient on such
"monstrous DOM" case should make it efficient everywhere in
practice.
2018-12-31 11:50:40 -05:00
Raymond Hill
f35dff2c9d
Code review related to performance in main content script
- Avoid concatenating with empty array: though the concatenated
  array is empty, this still forces the creation of a whole new
  array as per semantic of Array.prototype.concat().
  <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat>

- Do not convert arrays to strings when sending data to
  main process in surveyPhase1(): I no longer see any benefit
  doing so in profiling data (if I recall properly this was
  benefiting Firefox, but I can't remember for sure anymore why
  I chose to do so back then).
2018-12-29 16:34:46 -05:00
Raymond Hill
09fb3549f3
Improve creation of rows in dynamic filtering pane of popup panel
- Reuse existing rows without first removing them
- New rows appended all at once through DocumentFragment
2018-12-29 08:43:44 -05:00
Raymond Hill
87cf95c04b
Avoid redundant DOM attributes in dynamic filtering pane
Move redundant attributes in cells to parent row; use
Element.closest() to look-up these attributes when needed.
2018-12-29 06:54:05 -05:00
Raymond Hill
8eda70bce2
Import translation work from https://crowdin.com/project/ublock 2018-12-28 13:06:39 -05:00
Raymond Hill
4e2a8a0ce0
Fix vertical centering of hostnames in dynamic filtering pane
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/358

Additionally, use `display: none;` to unburden the browser
renderer from taking into account the `sup` element since
most of the time it is unused.
2018-12-28 12:56:56 -05:00
Raymond Hill
c78fa16e5b
Fine tune spacing of per-site switches
Hopefully this will fix the issue seen on Firefox for Android: for
some reasons, the popup panel's default size is now more zoomed
out than it used to be in latest stable release.

Additionally, I fixed the syntactically incorrect instances of
:before and :after.
2018-12-28 09:03:32 -05:00
Raymond Hill
f6dde894cb
Decrease a bit the space between extra tools at bottom of popup panel
Since the counts are now limited to two characters, no point
allocating more space than needed.
2018-12-27 11:24:32 -05:00
Raymond Hill
ab2efd1b84
Import translation work from https://crowdin.com/project/ublock 2018-12-27 10:21:25 -05:00
Raymond Hill
eb1428c8bb
Fix regression in the collapsing of blocked resources
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/356
2018-12-27 10:17:08 -05:00
Raymond Hill
8a88e9d931
Support CSS selectors mixed w/ operators in procedural cosmetic filters
Related issue:
- https://github.com/gorhill/uBlock/issues/3683

This commit further increases uBO's procedural cosmetic filters
Adguard's cosmetic filter syntax -- specifically those procedural
cosmetic filters where plain CSS selectors appeared following
a procedural oeprator (this was rejected as invalid by uBO).

Also, experimental support for `:watch-attrs` procedural
operator, as discussed in <https://github.com/uBlockOrigin/uBlock-issues/issues/341#issuecomment-449765525>.
Support may be dropped before next release depending on whether
a better solution is suggested.

Additionally, the usual opportunistic refactoring toward ES6
syntax.
2018-12-26 10:45:19 -05:00
Raymond Hill
e4cec5a15e
Add missing CSS rule for FA "exclamation-triangle" icon 2018-12-26 10:41:25 -05:00
Raymond Hill
2ba1cd7dc3
Import translation work from https://crowdin.com/project/ublock 2018-12-26 06:53:46 -05:00
Raymond Hill
0ffa4b91de
Minor code review
- Make FA icons non-selectable, because of spurious selection
  on Firefox for Android when merely tapping an icon
- Disable spellchecking in the static network filter editor
  in the logger
2018-12-25 10:28:32 -05:00
Raymond Hill
f4b9549d05
Remove use of background color style on the logger's input fields
Related feedback from the following issue:
- https://github.com/gorhill/uBlock/issues/787#issuecomment-449531979
2018-12-24 10:23:21 -05:00
Raymond Hill
be9e7fd11c
Code review related to the early blocking of network requests at launch 2018-12-24 08:56:35 -05:00
Raymond Hill
fe595bb2b9
Import translation work from https://crowdin.com/project/ublock 2018-12-24 08:11:20 -05:00
Raymond Hill
4d540f3ffa
Import translation work from https://crowdin.com/project/ublock 2018-12-23 18:04:21 -05:00
Raymond Hill
41548be6be
Move early blocking of requests out of experimental status on Firefox
Related issues:
- https://github.com/gorhill/uBlock/issues/2067
- https://github.com/uBlockOrigin/uBlock-issues/issues/128

Related mozbug issue:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1503721
2018-12-23 17:59:31 -05:00
Raymond Hill
99cdec5ba6
Informal code review to tidy up logger buffer fetching implementation 2018-12-23 15:35:32 -05:00
Raymond Hill
ddee2bff13
Import translation work from https://crowdin.com/project/ublock 2018-12-23 14:26:49 -05:00
Raymond Hill
6ac0c66813
Left-align text in "type" column in the logger
Feedback in related issue:
- https://github.com/gorhill/uBlock/issues/3654#issuecomment-449649399
2018-12-23 14:12:14 -05:00
Raymond Hill
f1567ee272
Prevent spurious wrapping of text in logger's expression picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/351
2018-12-23 09:18:37 -05:00
Raymond Hill
e2d1f50dd8
Normalize Adguard's plain cosmetic filters disguised as style-based filters
Reported by https://github.com/uBlock-user in
https://github.com/orgs/uBlockOrigin/teams/ublock-issues-volunteers/discussions/56

For some reasons, many cosmetic filters in Adguard's Annoyance List
are plain cosmetic filters disguised as style-based cosmetic filters,
and this was breaking uBO's ability to reverse lookup such filters
from the logger.
2018-12-23 08:58:03 -05:00
Raymond Hill
13ce898e52
Import translation work from https://crowdin.com/project/ublock 2018-12-22 15:53:26 -05:00
Raymond Hill
91144c4edc
Allow creating broad cosmetic filters directly from the picker
Using the Ctrl key while cliking an element on the page will cause
the picker to choose a broad cosmetic filter as candidate.
2018-12-22 15:44:23 -05:00
Raymond Hill
d574a09784
Make the element picker dialog slowly fade away when made discrete
This fixes the following issues:
- https://github.com/gorhill/uBlock/issues/3449
- https://github.com/uBlockOrigin/uBlock-issues/issues/55
2018-12-22 15:09:38 -05:00
Raymond Hill
69668d27b1
Ensure the text cursor in visible when a CodeMirror editor is resized
Related issues:
- https://github.com/gorhill/uBlock/issues/3706
- https://github.com/gorhill/uBlock/issues/3701
2018-12-22 13:35:46 -05:00
Raymond Hill
cd597709bb
Remember cursor position in "My filters" for next visit
Related issue:
- https://github.com/gorhill/uBlock/issues/3706
2018-12-22 13:09:56 -05:00
Raymond Hill
2be36ffe81
Fix bad alignment in comments 2018-12-22 12:26:50 -05:00
Raymond Hill
f3773ef6eb
Internationalize CodeMirror's hard-coded tooltips in the "My rules" pane
Related issue:
- https://github.com/gorhill/uBlock/issues/3708

This was brought into the issue above but I ended up forgotting
about it after I focused mostly on the second issue brought up
in there.
2018-12-22 11:55:13 -05:00
Raymond Hill
ba81f79d1b
Limit count badges of per-site tools to 99 in the popup panel
This is a revised fix as per feedback in the following issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/279#issuecomment-449531436
2018-12-22 11:19:44 -05:00
Raymond Hill
b9b0c3fba4
Remove the (confusing) "eventful" logger output filtering expression
This will render the following issue obsolete:
- https://github.com/uBlockOrigin/uBlock-issues/issues/349
2018-12-22 08:41:05 -05:00
Raymond Hill
ea3e3b6440
Inject inline-script logger scriptlet at document_end
Feedback from related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/343#issuecomment-449529429
2018-12-22 08:33:42 -05:00
Raymond Hill
c8fcdedc44
Report inline script tags in logger if present in document
Related issue:
    - https://github.com/uBlockOrigin/uBlock-issues/issues/343
2018-12-21 14:17:47 -05:00
Raymond Hill
e9d76b3575
Report inline script tags in logger if present in document
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/343
2018-12-21 14:16:17 -05:00
Raymond Hill
30093dc990
Remove (broken) benchmark pane 2018-12-21 12:02:23 -05:00
Raymond Hill
610ca2684b
Remove (broken) benchmark pane 2018-12-21 12:01:24 -05:00
Raymond Hill
2849dbb805
Fix duplicate entry in URL filtering dialog: https://github.com/gorhill/uBlock/issues/3401 2018-12-21 10:09:29 -05:00
Raymond Hill
21593dbfdd
Fix broken link 2018-12-21 08:41:53 -05:00