Commit graph

90 commits

Author SHA1 Message Date
Raymond Hill
917f3620e0
Revisit element picker arguments code
No need to store mouse coordinates in background
page, thus no need to post mouse coordinates
information for every click.

Rename/group element picker arguments and popup
arguments separately.
2019-09-18 12:17:45 -04:00
Raymond Hill
0051f3b5c7
Work toward modernizing code base: promisification
Swathes of code have been converted to use
Promises/async/await. More left to do.

Related commits:
- eec53c0154
- 915687fddb
- 55cc0c6997
- e27328f931
2019-09-16 16:17:48 -04:00
Raymond Hill
5ad809c07d
Code review color badge code
Related commit:
- 07c950f1e5

Cache [blocking mode, color] pair for fast
lookup in subsequent calls.
2019-08-19 09:00:53 -04:00
Raymond Hill
07c950f1e5
Review icon badge color management
Related commit & feedback:
- 7ff750eaf6

The color value for the icon badge is now
"attached" to the blocking profile value.
Additionally, as per feedback, `3p` rules
will be relaxing before master JavaScript
switch rules.
2019-08-11 13:55:39 -04:00
Raymond Hill
7ff750eaf6
Reflect blocking mode in badge color of toolbar icon
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/cmh910/

Additionally, the `3p` rule has been made distinct from
`3p-script`/`3p-frame` for the purpose of
"Relax blocking mode" command.

The badge color will hint at the current blocking mode.
There are four colors for the four following blocking
modes:
- JavaScript wholly disabled
- All 3rd parties blocked
- 3rd-party scripts and frames blocked
- None of the above

The default badge color will be used when JavaScript is not
wholly disabled and when there are no rules for `3p`,
`3p-script` or `3p-frame`.

A new advanced setting has been added to let the user choose
the badge colors for the various blocking modes,
`blockingProfileColors`. The value *must* be a sequence of
4 valid CSS color values that match 6 hexadecimal digits
prefixed with`#` -- anything else will be ignored.
2019-08-10 10:57:24 -04:00
Raymond Hill
693687fd74
Add keyboard support for toggling down blocking profile
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/371

By default, no specific keyboard shortcut is predefined,
this will have to be assigned by the user. The command
name in English is "Toggle blocking profile".

The default behavior is to toggle down according to one
of the following scenarios.

a) If script execution is disabled through the no-scripting
switch, the no-scripting switch will be locally toggled
so as to allow script execution. The page will be
automatically reloaded.

b) If script execution is not blocked but the 3rd-party
script and/or frame cells are blocked, local no-op rules
will be set so as to no longer block 3rd-party scripts
and/or frames. The page will be automatically reloaded.

Given this, it may take more than one toggle down command
to reach the lowest blocking profile, which is one where
JavaScript execution is not blocked and 3rd-party scripts
and frames resources block rules, if any, are bypassed
with local no-op rules.

TODO: At this point, I haven't yet decided whether
toggling from the lowest profile should restore the
original highest blocking profile.
2019-06-26 07:47:14 -04:00
Raymond Hill
9065bbdd48
Code review of whitelisting-related code
- Use `Map()` instead of `{}` for internal data
  structure
- Export as array of directives instead of as
  a string
2019-06-25 11:57:14 -04:00
Raymond Hill
f7bbc80717
Improve "Whitelist pane"; remove now useless built-in switch rule
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/214

Built-in whitelist directives are now rendered differently
than user-defined whitelist directives. Also, removing a
built-in whitelist directive will only cause that directive
to be commented out, so that users do not have to remember
built-in directives should they want to bring them back.

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

The built-in per-site switch rule
`no-scripting: behind-the-scene false` has been removed,
it should not ever be needed since there will always be a
valid root context for main- and sub-frames.
2019-05-18 14:20:05 -04:00
Raymond Hill
915c1f1f3c
Report resources blocked by csp= option in logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/552
2019-05-11 10:40:34 -04: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
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
3730d7d128
Fix https://github.com/uBlockOrigin/uBlock-issues/issues/40 2018-12-20 17:29:39 -05:00
Raymond Hill
9b27a98f90
Fix https://github.com/gorhill/uBlock/issues/3654
Additionally, there has been refactoring work done regarding
filtering context used throughout uBO, motivated by the fix
here.
2018-12-13 12:30:54 -05:00
Raymond Hill
6d34a52179
fix #2859 2018-09-03 14:06:49 -04:00
Raymond Hill
3c85c03194
fix #308, #3436, https://github.com/uBlockOrigin/uBlock-issues/issues/155
<https://github.com/gorhill/uBlock/issues/3436>: a new per-site switch
has been added, no-scripting, which purpose is to wholly disable/enable
javascript for a given site. This new switch has precedence over all
other ways javascript can be disabled, including precedence over dynamic
filtering rules.

The popup panel will report the number of script resources which have
been seen by uBO for the current page. There is a minor inaccuracy to
be fixed regarding the count, and which fix requires to extend request
journaling.

<https://github.com/gorhill/uBlock/issues/308>: the `noscript` tags will
now be respected when the new no-scripting switch is in effect on a given
site.

A default setting has been added to the _Settings_ pane to
disable/enable globally the new no-script switch, such that one can
work in default-deny mode regarding javascript execution.

<https://github.com/uBlockOrigin/uBlock-issues/issues/155>: a new
hidden setting, `requestJournalProcessPeriod`, has been added to
allow controlling the delay before uBO internally process it's
network request journal queue. Default to 1000 (milliseconds).
2018-08-31 18:47:02 -04:00
Raymond Hill
3d867baf0b
fix https://github.com/NanoMeow/QuickReports/issues/6#issuecomment-414516623 2018-08-21 07:07:14 -04:00
Raymond Hill
5bd18f1edc
fix "Element picker/zapper does not switch tabs" in https://github.com/uBlockOrigin/uBlock-issues/issues/168 2018-08-14 20:14:13 -04:00
Raymond Hill
87b323fe05
fix https://github.com/uBlockOrigin/uBlock-issues/issues/135 2018-07-20 07:11:21 -04:00
Raymond Hill
211048396f
fix https://github.com/uBlockOrigin/uBlock-issues/issues/102 2018-07-04 15:03:09 -04:00
Hugo Xu
048930ca8f RegExp fix for https://github.com/gorhill/uBlock/issues/3717 (#3718)
* Update ublock.js

* Update ublock.js

* Update ublock.js
2018-04-20 16:09:41 -04:00
Raymond Hill
9ce1f8af08
fix https://www.reddit.com/r/uBlockOrigin/comments/8524cf/my_custom_scriptlets_doesnt_work_what_am_i_doing/ 2018-03-19 10:25:03 -04:00
Raymond Hill
9715d1e8b9
make use of CodeMirror for Whitelist pane 2018-03-12 08:28:07 -04:00
Raymond Hill
2c901588c7
fix #3546, #3428 2018-02-26 13:59:16 -05:00
gorhill
806032cdc4
improve DOM inspector
- Fix regressions reported in #3159
- Fix #2001
- Fix some item points in #407
2017-11-20 08:42:32 -05:00
gorhill
26e9bb7c19
code review: use Map instead of Object 2017-10-25 11:37:58 -04:00
gorhill
95b25f7d49
fix #3150 2017-10-19 09:35:28 -04:00
gorhill
5626b5005a
fix #2946 2017-09-12 11:43:43 -04:00
gorhill
d50e76745d
fix #2658 2017-05-28 12:21:56 -04:00
gorhill
39aeaa12a7
new feature: element zapper 2017-05-27 11:51:24 -04:00
gorhill
9309df4196 3rd-party filters pane revisited 2017-01-22 16:05:16 -05:00
Raymond Hill
3b9fd49c50 Assets management refactored (#2314)
* refactoring assets management code

* finalizing refactoring of assets management

* various code review of new assets management code

* fix #2281

* fix #1961

* fix #1293

* fix #1275

* fix update scheduler timing logic

* forward compatibility (to be removed once 1.11+ is widespread)

* more codereview; give admins ability to specify own assets.json

* "assetKey" is more accurate than "path"

* fix group count update when building dom incrementally

* reorganize content (order, added URLs, etc.)

* ability to customize updater through advanced settings

* better spinner icon
2017-01-18 13:17:47 -05:00
gorhill
6e458dca5c fix #2264 2016-12-26 11:35:37 -05:00
gorhill
d913eea1f6 fix #2132 + various minor code review 2016-11-08 15:53:08 -05:00
gorhill
a92decd641 fix #1578: regex as whitelist directive 2016-11-06 16:51:19 -05:00
gorhill
446d7fad2e fix #2010, #2086 2016-11-05 14:48:42 -04:00
gorhill
e01a130bc5 changes required to use chromium platform code for webext platform code 2016-10-19 10:20:26 -04:00
gorhill
7984c7562c fix #2033 2016-09-27 08:31:12 -04:00
gorhill
520c58102e fix typo in comment 2016-05-28 09:19:35 -04:00
gorhill
5ee427d0f8 fix #1662 2016-05-28 09:18:36 -04:00
gorhill
2ea36d6a7f fix https://github.com/uBlockOrigin/uAssets/issues/50 2016-05-26 08:34:28 -04:00
gorhill
47b3e26942 fix #1607 2016-05-03 08:22:48 -04:00
gorhill
89148351e8 #1163: this implements "block elements by size" 2016-01-17 13:30:43 -05:00
gorhill
ea49484dd3 this fixes #1067 + partially fixes #1070 2015-12-15 10:40:40 -05:00
gorhill
c7bb242302 this fixes the logging of cosmetic filters in iframes 2015-07-18 09:15:08 -04:00
gorhill
631443768f dom inspector: ébauche 2015-06-26 00:08:41 -04:00
gorhill
1ba7894a29 ability to prevent local ip address leak thru webrtc 2015-06-24 20:01:27 -04:00
gorhill
1784ffd411 this fixes hyperlink auditing setting being r/o after launch of uBlock 2015-06-02 09:27:18 -04:00
gorhill
14371b5d92 this fixes #274 2015-06-01 15:03:22 -04:00
gorhill
72c930ddff logger: UI work on URL-based dynamic filtering 2015-05-24 18:50:09 -04:00
gorhill
43f9657d0f this fixes #227 2015-05-22 08:05:55 -04:00