Commit Graph

6939 Commits

Author SHA1 Message Date
Raymond Hill 6c7d3a40d6
Update popup panel screenshots 2019-09-12 14:25:35 -04:00
Raymond Hill 97d6d5028b
Fix mishandling of procedural cosmetic exceptions in logger
Issue reported by @uBlock-user in team channel.

Creating cosmetic procedural exception filters was
causing `cosmetic-logger.js` scriptlet to throw at
and thus further breaking the logging of cosmetic
filters overall.
2019-09-12 13:05:41 -04:00
Raymond Hill e393a52442
Fix icon title always showing `(0)` when badge is disabled
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/d33d37/
2019-09-12 12:26:09 -04:00
Raymond Hill a3504fc318
Make Firefox dev build auto-update 2019-09-11 08:21:37 -04:00
Raymond Hill b5c1efc7f5
Informal code review toward ES6 2019-09-11 08:08:30 -04:00
Raymond Hill 8ef896476a
New revision for dev build 2019-09-11 08:04:55 -04:00
Raymond Hill 93f438f55e
Add advanced setting for extension reload on update
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/717

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/717#issuecomment-530275655

New advanced setting: `extensionUpdateForceReload`

Default value: `false`

If set to `true`, the extension will unconditionally reload
when an update is available; otherwise the extension will
reload only when being explicitly disabled then enabled, or
when the browser is restarted.
2019-09-11 08:00:55 -04:00
Raymond Hill 0c4eabb743
Make Firefox dev build auto-update 2019-09-10 16:48:47 -04:00
Raymond Hill 13b0be7f9e
New revision for dev build 2019-09-10 16:45:02 -04:00
Raymond Hill 7e8822cfc5
Import translation work from https://crowdin.com/project/ublock 2019-09-10 16:44:14 -04:00
Raymond Hill 1e7e6f86a6
Reuse existing Set/Map when calling scriptletFilteringEngine.retrieve
Reuse permanent instances instead. The trailing `$` is
used to denote these variables are register-like
instances, i.e. their content is valid only for the
duration of the call. (From now on I will use this
convention throughout the code base.)
2019-09-10 13:59:28 -04:00
Raymond Hill a73dd0a9f2
Fix entity-based lookup in html & scriptlet filtering
Entity-based filters where not properly looked-up if
they used subdomains. Example:

- `example.*##^script` => ok

- `www.example.*##^script` => failed on `https://www.example.com/`
2019-09-10 10:51:34 -04:00
Raymond Hill ed94692238
Make Firefox dev build auto-update 2019-09-09 14:24:54 -04:00
Raymond Hill a94f5cc155
New revision for dev build 2019-09-09 14:16:56 -04:00
Raymond Hill 2fd86a66fc
Add json-prune.js scriptlet
The scriptlet will trap calls to JSON.parse, and
if the result of the parsing is an Object, it
will remove specified properties from the result
before returning to the caller.

Usage:

    ##+js(json-prune, arg1, [arg2])

Where:

- arg1: a list of space-separated properties to remove

- arg2: optional, a list of space-separated properties
        which must be all present for the pruning to
        occur

Example:

    ##+js(json-prune, enabled, adpath config)

A property in a list of properties can be a chain
of properties, example: adpath.url.first
2019-09-09 14:06:23 -04:00
Raymond Hill 4792e0e291
Coalesce tab reloads in burst "relax blocking mode" ops
Quickly firing "Relax blocking mode" commands will
cause the tab to reload only once.
2019-09-08 12:52:28 -04:00
Raymond Hill ad0315a4cd
Make Firefox dev build auto-update 2019-09-07 12:26:11 -04:00
Raymond Hill b74b8821d6
New revision for dev build 2019-09-07 09:31:25 -04:00
Raymond Hill df276a664d
New revision for dev build 2019-09-07 08:33:15 -04:00
Raymond Hill 3eeaba45d9
Cherry-picked ac7825c789 2019-09-07 08:31:32 -04:00
Raymond Hill a488e1f053
Make Firefox dev build auto-update 2019-09-06 13:07:40 -04:00
Raymond Hill c796561742
New revision for dev build 2019-09-06 13:04:45 -04:00
Raymond Hill c8c2e11d09
Prevent reload if updated version is higher than current
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/717

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/717#issuecomment-528921730
2019-09-06 13:03:06 -04:00
Raymond Hill c55288281c
Make Firefox dev build auto-update 2019-09-06 11:51:52 -04:00
Raymond Hill 8f319e3ceb
Import translation work from https://crowdin.com/project/ublock 2019-09-06 11:48:01 -04:00
Raymond Hill 596619b260
New revision for dev build 2019-09-06 11:45:19 -04:00
Raymond Hill bcf5ac1fee
Add advanced setting to control logger popup type
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/663

The advanced setting `loggerPopupType` has been added, to
control the type of window to be used when the logger is
launched as a separate window.

The default value is `popup`, it can be changed to any of
the values documented at:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows/CreateType
2019-09-06 11:41:07 -04:00
Raymond Hill 5688888ec1
Remove pointless local scoping 2019-09-06 10:38:17 -04:00
Raymond Hill 35854e4baf
Use more descriptive name for raf-if.js
Related feedback:
- 6831967f5f (commitcomment-34979880)
2019-09-06 09:40:04 -04:00
Raymond Hill 59bdf2b4cc
Prevent uBO from being reloaded mid-session
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/717

Just registering a onUpdateAvailable() listener prevents
the browser from reloading the extension mid-session.

Ref:
- https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onUpdateAvailable
2019-09-04 10:24:24 -04:00
Raymond Hill b5e34f12fc
Make Firefox dev build auto-update 2019-09-02 08:50:35 -04:00
Raymond Hill 7a8ad5afd8
New revision for dev build 2019-09-02 08:46:25 -04:00
Raymond Hill aee6b2d1cb
Fix regression in filter compilation in element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/715

Regression from fix to issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/710
2019-09-02 08:43:49 -04:00
Raymond Hill b488334d61
Make Firefox dev build auto-update 2019-09-01 13:14:18 -04:00
Raymond Hill c231bb8694
New revision for dev build 2019-09-01 13:00:18 -04:00
Raymond Hill ca9b29c7ec
Distinguish between priviledge and unprivileged messages
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/710

Messages from unprivileged ports (i.e. from content scripts)
are no longer relayed to message handlers which are to be
strictly used to execute privileged code.

The last remaining case of unprivileged messages which
should be converted into a privileged ones will be taken
care of when the following issue is fixed:
- https://github.com/gorhill/uBlock/issues/3497
2019-09-01 12:43:12 -04:00
Raymond Hill ac56aabd7c
New revision for stable release 2019-08-30 09:58:38 -04:00
Raymond Hill ed2fc4a7bb
Import translation work from https://crowdin.com/project/ublock 2019-08-30 09:29:11 -04:00
Raymond Hill 9f6e369cd2
Make Firefox dev build auto-update 2019-08-25 09:46:03 -04:00
Raymond Hill 883aad50b1
New revision for dev build 2019-08-25 09:42:14 -04:00
Raymond Hill e3043fadc7
Fix console logging ability in setTimeout-if
Regression from e0fd9750d4
2019-08-25 09:38:08 -04:00
Raymond Hill 14e60f5e2d
Make Firefox dev build auto-update 2019-08-25 09:15:48 -04:00
Raymond Hill 254a356079
New revision for dev build 2019-08-25 09:11:25 -04:00
Raymond Hill 1d805fb9da
Add support for `!#if false` in list directive processor
To more easily comment out blocks of filters.
2019-08-25 09:08:41 -04:00
Raymond Hill e0fd9750d4
Further fix new setTimeout-if/setInterval-if scriptlets
Addtionally, a dedicated test page has been added:

https://gorhill.github.io/uBlock/tests/scriptlet-injection-filters-1.html
2019-08-25 09:03:24 -04:00
Raymond Hill a7c852ca5d
Make Firefox dev build auto-update 2019-08-24 14:00:44 -04:00
Raymond Hill 4fbbbe2bb7
New revision for dev build 2019-08-24 13:57:55 -04:00
Raymond Hill e0f0aedad6
Ability to negate delay in new setTimeout-if scriptlet
This also apply to setInterval-if. Thus to defuse
calls to setTimeout(fn, 1000), the filter could be:

    ##+js(stif, , !1000)

Meaning "allow setTimeout if the delay is not 1000".
2019-08-24 13:54:31 -04:00
Raymond Hill e0b8cf24d1
Clear internal cache when loading redirect rules
Related commit:
- 3e5c9e00ab

This fix a regression: newly added redirect rules
could end up not being taken into account unless
uBO was restarted.
2019-08-24 13:48:50 -04:00
Raymond Hill 4a60810389
Make Firefox dev build auto-update 2019-08-23 11:38:56 -04:00