Commit Graph

7337 Commits

Author SHA1 Message Date
Raymond Hill 1400b146ec
Add 32- & 64-pixel icon entries in manifest
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/939
2020-03-14 13:05:46 -04:00
Raymond Hill 2cbbc30084
Also remove text node in `:remove()` operator
Related discussion:
- https://github.com/gorhill/uBO-Extra/issues/119#issuecomment-537842967

As an incidental side effect, this may or may not
prevent execution of the content of some inline
script tags.
2020-03-09 11:34:49 -04:00
Raymond Hill 0f33f2386d
Expand log output of window.open-defuser 2020-03-09 10:09:40 -04:00
Raymond Hill 425c12af54
Make Firefox dev build auto-update 2020-03-09 08:21:05 -04:00
Raymond Hill ca0a3b3090
New revision for dev build 2020-03-09 07:57:46 -04:00
Raymond Hill b27848a060
Improve window.open-defuser scriptlet
The new syntax deprecate the old syntax, though the
old syntax will still be supported until it's no
longer used in mainstream filter lists.

The new syntax is:

    example.com##+js(window.open-defuser, pattern, seconds)

`pattern`:

A pattern to match for the defusing to take place.
Patterns which starts and ends with `/` will be
interpreted as regular expressions. To NOT match a
pattern, prefix with `!`.

`seconds`:

If not present, no window will be opened and the
scriptlet will return `null`.

If present and a valid integer value, the defuser
will return a valid window object even though no
popup window is opened. The returned window object
will cease to be valid after the specified number
of seconds.
2020-03-08 16:15:58 -04:00
Raymond Hill 1d9421b8b2
Improve validation of CSS selector-based cosmetic filters
Reported internally. The following invalid filter was not
discarded by uBO:

    123tvnow.com##.123tv-ads

The correct form should be:

    123tvnow.com##.\31 23tv-ads

Not discarding invalid CSS selector-based cosmetic
filter may break CSS selector-based cosmetic
filtering.
2020-03-08 10:55:19 -04:00
Raymond Hill 30ab587b95
New revision for dev build 2020-03-07 14:40:20 -05:00
Raymond Hill 72bb700568
Add procedural cosmetic operators remove() and upward()
***

New procedural cosmetic operator: `:remove()`

Related issue:
- https://github.com/gorhill/uBlock/issues/2252

The purpose is to outright remove elements from the
DOM tree. Since `:remove()` is an "action" operator,
it must only be used as a trailing operator (just
like the `:style()` operator).

AdGuard's cosmetic filter syntax `{ remove: true; }`
will be converted to uBO's `:remove()` operator
internally.

***

New procedural cosmetic operator: `:upward(...)`

The purpose is to lookup an ancestor element.

When used with an integer argument, it is synonym of
`:nth-ancestor()`, which will be deprecated and which
will no longer be supported once no longer used in
mainstream filter lists.

Filter lists maintainers must only use `:upward(int)`
instead of `:nth-ancestor(int)` once the new operator
become available in all stable releases of uBO.

`:upward()` can also accept a CSS selector as argument,
in which case the nearest ancestor which matches the
CSS selector will be selected.
2020-03-07 14:25:06 -05:00
Raymond Hill 14ebfbea27
Improve set-constant.js scriptlet
The scriptlet will now still try to trap a specific
property if a segment of the chain is not undefined
while yet not an object either.

For example, this now allows to set a value on
`document.body.onselectstart` when `document.body` has
not been instantiated yet by the browser parser,
whereas this would previously fail because
`document.body` would be `null` while the scriptlet
was testing against `undefined`.
2020-03-07 14:16:54 -05:00
Raymond Hill 04021424d0
New revision for stable build 2020-03-06 08:02:04 -05:00
Raymond Hill 7442463a87
Fix spurious v-scrollbar when hovering bottom-most cells 2020-03-04 13:34:50 -05:00
Raymond Hill 6041a1c894
Make Firefox dev build auto-update 2020-03-03 11:46:05 -05:00
Raymond Hill d69ab86c30
New revision for release candidate 2020-03-03 11:41:21 -05:00
Raymond Hill 08d370d32e
Catch possible exceptions when accessing window.localStorage
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/899

This is a code review of previous commits related to
the above issue.
2020-03-03 11:31:14 -05:00
Raymond Hill 39dc88b8f5
Make Firefox dev build auto-update 2020-03-02 15:51:15 -05:00
Raymond Hill 13f3fcbcbd
New revisiom for release candidate 2020-03-02 15:40:06 -05:00
Raymond Hill 891f45d440
Fix hidden hyphen location in DA translation 2020-03-02 15:39:32 -05:00
Raymond Hill e77a869651
Make Firefox dev build auto-update 2020-03-02 13:00:38 -05:00
Raymond Hill 16869539a1
New revision for release candidate 2020-03-02 12:36:47 -05:00
Raymond Hill bef9eedf73
Support hidden hyphen HTML entity in translation work
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/907#issuecomment-590804054
2020-03-02 12:34:50 -05:00
Raymond Hill ea2da021ba
Make Firefox dev build auto-update 2020-02-28 14:45:34 -05:00
Raymond Hill e40b23bc88
New revision for release candidate 2020-02-28 14:35:07 -05:00
Raymond Hill a1dabf3c1a
Use `disable_non_proxied_udp` for `webRTCIPHandlingPolicy`
The stricter mode `disable_non_proxied_udp` is preferable
to `default_public_interface_only` to prevent local IP
address leakage through WebRTC.

This mode is properly supported since Firefox 70, so the
less strict `default_public_interface_only` will now be
used only for Firefox 69 and older.
2020-02-28 14:30:40 -05:00
Rory O’Kane be111c4036
In Element Zapper, support Mac keyboards’ Delete key (#3770)
Override the Backspace key, not just the Delete key, as Mac keyboards have Backspace as the only delete key and label it Delete.

Source of key value: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values#Editing_keys

More background on Mac keyboard shortcuts: Mac keyboards can emulate Delete using fn+Delete, meaning Forward Delete, but Mac software does not use it except in text editing. When deletion is dangerous, Mac software requires holding a modifier key in conjuction with Delete, but I think it’s better to make deletion easy in this case.

This new binding has a potential downside: if the user Backspace key normally goes Back in history (which can differ across OSs and browsers), this will change the behavior to delete the selected element instead. If the user really wants to go back in history, they will have to press Escape to leave the mode and then press Backspace, or they will have to press an alternative keyboard shortcuts such as Alt+Left. I think the user will rarely want to go back in history in the middle of picking an element, though.

That downside could be mitigated by conditioning the key check on `runtime.PlatformOs` (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/PlatformOs). But that would complicate the code a lot compared to the importance of this feature, and such detection would still fail to capture the user’s intent accurately in all cases. I think it’s better to unconditionally accept both Backspace (Delete) and Delete (Forward Delete).
2020-02-28 14:28:00 -05:00
Raymond Hill 8780ef2413
Remove no longer maintained KOR list
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/914
2020-02-28 08:10:42 -05:00
Raymond Hill fa5a082582
Make Firefox dev build auto-update 2020-02-27 10:36:10 -05:00
Raymond Hill cad5048744
new revision for dev build 2020-02-27 10:01:54 -05:00
Raymond Hill c40df88bc6
Make row slightly taller on mobile 2020-02-27 10:01:09 -05:00
Raymond Hill cf084e1db7
Import translation work from https://crowdin.com/project/ublock 2020-02-27 09:58:55 -05:00
Raymond Hill c4caa5539d
Move refresh button to the right of the power button 2020-02-27 09:29:14 -05:00
Raymond Hill 3ca25ef200
Make Firefox dev build auto-update 2020-02-25 11:10:50 -05:00
Raymond Hill af40de0a06
New revision for dev build 2020-02-25 11:03:50 -05:00
Raymond Hill da71c3a499
Force console output when explicitly requested from dev tools
Related feedback:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1617666#c0

Not being able to see benchmark results when explicitly
requesting benchmark results is not very user-friendly;
this commit fixes this.
2020-02-25 11:00:58 -05:00
Raymond Hill 953e0c3197
Use getItemAsync() instead of getItem
Related commit:
- da0ef9454a

vAPI.localStorage.getItemAsync() was added after
the above commit.
2020-02-25 07:37:12 -05:00
Raymond Hill 44dfb8fbad
Make Firefox dev build auto-update 2020-02-24 13:50:29 -05:00
Raymond Hill 3feede646d
New revision for dev build 2020-02-24 13:43:14 -05:00
Raymond Hill 034c915f3b
Allow re-entrance in abort-current-inline-script
Related feedback:
- https://github.com/DandelionSprout/adfilt/issues/7#issuecomment-590391877

If a property is already trapped with a getter/setter,
propagate to these after validation succeed.
2020-02-24 13:40:17 -05:00
Raymond Hill 60348c4624
Make Firefox dev build auto-update 2020-02-24 10:45:19 -05:00
Raymond Hill ba2fabdb54
New revision for dev buil build 2020-02-24 10:34:09 -05:00
Raymond Hill c17a9c8a93
Fix spurious warning when force-reloading the dashboard
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/905

Additionally, minor changes to avoid spurious errors in
browser console.
2020-02-24 09:59:35 -05:00
Raymond Hill 7634604aa8
Make element picker mind that network filters are case-insensitive
Related discussion:
- https://github.com/easylist/easylist/pull/4950#issuecomment-590064744
2020-02-24 09:24:54 -05:00
Raymond Hill c13060aadc
Make Firefox dev build auto-update 2020-02-23 12:35:48 -05:00
Raymond Hill b55991d346
Import translation work from https://crowdin.com/project/ublock 2020-02-23 12:26:07 -05:00
Raymond Hill c3160be1eb
New revision for dev build 2020-02-23 12:24:11 -05:00
Raymond Hill 3621792f16
Rework/remove remnant of code dependent on localStorage
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/899
2020-02-23 12:18:45 -05:00
Raymond Hill d16ac963ef
Use correct element id fenix popup panel 2020-02-23 12:16:50 -05:00
Saitama 84635ad38d
mvps list secure protocol http => https (#3769) 2020-02-23 06:57:03 -05:00
Raymond Hill ece5734375
Make Firefox dev build auto-update 2020-02-22 13:46:17 -05:00
Raymond Hill 64d9f90e8e
New revision for dev build 2020-02-22 13:39:58 -05:00