Commit Graph

7034 Commits

Author SHA1 Message Date
Raymond Hill bf697f344a
Log procedural cosmetic exception filters
Related issue:
- https://github.com/gorhill/uBlock/issues/127

Procedural cosmetic exception filters were the
last class of cosmetic exception filters not
being reported in the logger; this commit fixes
this.

Additionally, ensure that a single DOM listener
can't prevent other listeners from being
processed by throwing an exception. Such approach
would have prevented regression leading to
emergency release 1.22.4:
- https://github.com/gorhill/uBlock/releases/tag/1.22.4
2019-09-30 18:21:24 -04:00
Raymond Hill 95469032a4
Make Firefox dev build auto-update 2019-09-30 11:46:38 -04:00
Raymond Hill d66a0dda9c
New revision for dev build 2019-09-30 11:43:13 -04:00
Raymond Hill 7ac908a3f8
Fix regression in logger's reverse-lookup of filters
Related commit:
- e1d75ee602
2019-09-30 11:41:43 -04:00
Raymond Hill ef45543c83
Make Firefox dev build auto-update 2019-09-30 10:47:35 -04:00
Raymond Hill 0e0ccfe545
New revision for dev build 2019-09-30 10:42:59 -04:00
Raymond Hill 41ab06a47b
Fix regression in cosmetic filtering
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/740

Related commit:
- 3f074d7908
2019-09-30 10:40:56 -04:00
Raymond Hill e1d75ee602
Prevent reverse-lookup from finding badfilter-ed filters
This could occur when clicking old entries in the logger
which no longer matched the internal state of uBO.

Related feedback:
- https://github.com/MajkiIT/polish-ads-filter/issues/14768#issuecomment-536006312
2019-09-30 08:53:02 -04:00
Raymond Hill 23b6f35893
Make Firefox dev build auto-update 2019-09-30 08:06:21 -04:00
Raymond Hill c6f8e0e72d
New revision for dev build 2019-09-30 07:57:32 -04:00
Raymond Hill fc277cb16b
Import translation work from https://crowdin.com/project/ublock 2019-09-30 07:56:34 -04:00
Raymond Hill 3f074d7908
Use `self` when testing for `vAPI` presence 2019-09-30 07:50:35 -04:00
Raymond Hill a8df19fee4
Rename register-like variables
Use leading `$` instead of trailing `$` to denote
register-like variables, this conveniently allows
to group them together in the debugger.
2019-09-29 13:21:09 -04:00
Raymond Hill bf99623a54
Add sanity checks
In rare circumstances, it's possible the content
script lose access to the background page, best
to check against this to avoid spurious console
errors.
2019-09-29 12:26:58 -04:00
Raymond Hill c95da8f5c5
Make Firefox dev build auto-update 2019-09-28 13:51:20 -04:00
Raymond Hill adea477792
New revision for dev build 2019-09-28 13:47:55 -04:00
Raymond Hill e94024d350
Reduce memory usage in staticExtFilteringEngine.HostnameBasedDB
Using pairs of integers allows the use of a
single integer-only array to store lists of
string indices associated to a specific
hostname.

Memory usage of instances of HostnameBasedDB
as per Chromium's heap snaphshot (bytes):

Before:
    2,459,256 => specific cosmetic filters
      944,152 => scriptlet filtering
          736
    ---------
    3,404,144

After:
    1,947,448 => "
      757,936 => "
          632
    ---------
    2,706,016

Ultimately, using 2 integers for each entry
instead of a single one is still worth it
because this allows the use of one single
integer-only array instead of having to use
an array of arrays for hostnames which have
multiple entries.
2019-09-28 13:36:07 -04:00
Raymond Hill 4bf6503f0a
Store `csp=` filters into main data structure
This commits make it so that `csp=` filters
are now stored in the same data structures as
all other static network filters rather than
being stored in a separate one.

This internal change is motivated by the wish
to bring session filters to the static network
filtering engine, as has already been done for
the static extended filtering engine in the
following commit:

59c9a34d34
2019-09-28 11:30:26 -04:00
Raymond Hill 235851db42
Make Firefox dev build auto-update 2019-09-26 17:05:20 -04:00
Raymond Hill 024dcaa579
New revision for dev build 2019-09-26 16:25:46 -04:00
Raymond Hill efa4ff3bcf
Code review re. dynamically loaded vapi-client-extra.js
Related commit:
- 87d0e456f1

Ensure that the code which depends on extending
`vapi-client.js` is ready to deal with
`vapi-client-extra.js` failing to load.
2019-09-26 15:57:55 -04:00
Raymond Hill e97ab16a54
Make Firefox dev build auto-update 2019-09-26 12:52:31 -04:00
Raymond Hill 8523a36316
Fix revision 2019-09-26 12:49:16 -04:00
Raymond Hill 631ccdb1a0
New revision for dev build 2019-09-26 12:42:15 -04:00
Raymond Hill 7912e919b6
Code review of session filters commit
Related commits:
- 46d36cb0b0
- 59c9a34d34
2019-09-26 12:40:56 -04:00
Raymond Hill 16261aa6b5
Minor code review for d6ccc9857d
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/736
2019-09-26 09:25:33 -04:00
Raymond Hill d6ccc9857d
Fix missing newline in merging of sublists
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/736

Regression from:
- e27328f931
2019-09-26 09:13:50 -04:00
Raymond Hill 978f04219a
Make Firefox dev build auto-update 2019-09-25 11:34:29 -04:00
Raymond Hill 39e3c33b6e
New revision for dev build 2019-09-25 11:30:36 -04:00
Raymond Hill 46d36cb0b0
Code review of session filters commit
Related commit:
- 59c9a34d34
2019-09-25 11:21:34 -04:00
Raymond Hill 28aee88a7b
Fix regression in logger's summary pane
Related feedback:
- 59c9a34d34 (commitcomment-35226346)
2019-09-25 06:14:43 -04:00
Raymond Hill 1cb77aaea2
Make Firefox dev build auto-update 2019-09-24 17:20:02 -04:00
Raymond Hill 437cbe73dd
New revision for dev build 2019-09-24 17:14:13 -04:00
Raymond Hill 59c9a34d34
Add ability to quickly create exceptions in logger
This is a feature under development, hidden behind
a new advanced setting, `filterAuthorMode` which
default to `false`.

Ability to point-and-click to create temporary
exception filters for static extended filters (i.e.
cosmetic, scriptlet & html filters) from within
the summary pane in the logger. The button to
toggle on/off temporary exception filter is
labeled `#@#`.

The created exceptions are temporary and will be
lost when restarting uBO, or manually toggling off
the exception filters.

Creating temporary exception filters does not
cause the filter lists to reloaded, and thus there
is no overhead in creating/removing these temporary
exception filters.
2019-09-24 17:05:03 -04:00
Raymond Hill 733b2330de
Prevent spurious error messages to browser console
These spurious error messages can occur when a
extension framework API method return a
rejected Promise. In uBO the results of
browserAction methods is not used so it can be
safely discarded.
2019-09-23 09:29:17 -04:00
Raymond Hill 1c72b171de
Make Firefox dev build auto-update 2019-09-23 08:41:58 -04:00
Raymond Hill f6b1bf02ff
New revision for dev build 2019-09-23 08:35:43 -04:00
Raymond Hill f204d24bf4
Match static popup filter against local context
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/d6zbqv/

For static filter `popup` filter purpose, the URL of the
embedded frame from which the popup was launched will
be used in the matching algorithm.
2019-09-23 08:25:23 -04:00
Raymond Hill d15163d3bb
Clarify that the code base was really old and obsolete 2019-09-22 09:57:38 -04:00
Raymond Hill 6b461e8a57
Make Firefox dev build auto-update 2019-09-22 09:35:36 -04:00
Raymond Hill 8f9c2dd824
New revision for dev build 2019-09-22 09:24:44 -04:00
Raymond Hill 1d2b24c79a
Fix erroneous reports of blocked popups in logger
Reported internally by:
- https://github.com/gwarser

This was reproducible at the following link when
`ping`requests were blocked:
- https://testpages.adblockplus.org/en/filters/ping
2019-09-22 09:19:57 -04:00
Raymond Hill 010635acd6
Add support for `ping` static filter option
Related issue:
- https://github.com/gorhill/uBlock/issues/1493

Documentation:
- https://help.eyeo.com/adblockplus/how-to-write-filters#type-options

Test page:
- https://testpages.adblockplus.org/en/filters/ping

Additionally, network requests of type `beacon` will
be mapped to `ping` by the static filtering engine.
2019-09-22 09:11:55 -04:00
Raymond Hill 22b390eb00
Fix case of unreported `:style` filters in logger
As reported by https://github.com/uBlock-user,
adding the two following filters:

example.com##div:style(width: 1016px !important)
example.com##div:style(display: block !important)

The logger would report only one of the filter when
navigating to https://example.com/
2019-09-22 07:51:20 -04:00
Raymond Hill 8c47fa1a3e
Use async/await instead of chained thens 2019-09-21 19:48:02 -04:00
Raymond Hill 3568ccdd33
Make Firefox dev build auto-update 2019-09-21 19:30:34 -04:00
Raymond Hill 243a54b65a
New revision for dev build 2019-09-21 19:27:35 -04:00
Raymond Hill eb871ae558
Fix regression in selfie destruction code
Related commit:
- 915687fddb (diff-73ef8c4664f2ec8c02320d50b2908efdR1100-R1113)

Since selfie destruction is now deferred so as to
coallesce burst of call to destroy(), the selfie
load code must mind whether there is a pending
destruction in order to decide whether the
selfie can be safely loaded.

Related feedback:
- 23c4c80136 (commitcomment-35179834)
2019-09-21 19:24:47 -04:00
Raymond Hill 3bdad19d6e
Make Firefox dev build auto-update 2019-09-21 16:54:47 -04:00
Raymond Hill 263f3760b3
New revision for dev build 2019-09-21 16:50:15 -04:00