Commit Graph

6369 Commits

Author SHA1 Message Date
Raymond Hill 8edc3bf3e7
Import translation work from https://crowdin.com/project/ublock 2019-02-20 07:25:56 -05:00
Raymond Hill 61374a927e
New revision for dev build 2019-02-20 07:22:48 -05:00
Raymond Hill c83b6776da
Remove support for implicit scriptlet injection
Related issue:
- https://github.com/gorhill/uBlock/issues/3550
2019-02-20 07:18:37 -05:00
Raymond Hill b585518c00
Do not fall back to alternative cache backend if selected one fails
Default behavior is to fall back to an alternative backend
if the uBO-selected one is not available. However there will be
no fall back when the `cacheStorageAPI` is set to one specific
backend by the user.
2019-02-20 07:05:45 -05:00
Raymond Hill 87feb47b51
Support disabling `suspendTabsUntilReady` in Firefox
The value of `suspendTabsUntilReady` was disregarded in Firefox and
uBO defaulted to always defer tab loading until it was ready.

This commit allows to disable the deferring of tab loading in
Firefox. The new valid values for `suspendTabsUntilReady` are:
- `unset`: leave it to the platform to pick the optimal
  behavior (default)
- `no`: do no suspend tab loading at launch time
- `yes`: suspend tab loading at launch time
2019-02-19 12:30:37 -05:00
Raymond Hill 928ab91ab8
Add support to benchmark the dynamic filtering pane
From uBO's dev console, type:
- `µBlock.sessionFirewall.benchmark();`

Keep in mind that it's the temporary ruleset being benchmarked.
2019-02-19 10:46:33 -05:00
Raymond Hill 3ee25537a1
Make Firefox dev build auto-update 2019-02-18 18:28:22 -05:00
Raymond Hill 700825bf23
New revision for dev build 2019-02-18 16:51:20 -05:00
Raymond Hill 93842a3f9c
Improve detection of invalid CSS selectors
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/389

Additionally, fix case of using potentially uninitialized variable
in preview mode. Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/425
2019-02-18 16:00:42 -05:00
Raymond Hill 426a6ea9a7
Fix spurious output at uBO's dev console
Regression from https://github.com/gorhill/uBlock/commit/0d369cda21bb
2019-02-18 14:41:04 -05:00
Raymond Hill 47ceaea3b9
Make Firefox dev build auto-update 2019-02-18 06:27:33 -05:00
Raymond Hill b7e91c43ca
New revision for dev build 2019-02-18 06:20:39 -05:00
Raymond Hill f7a632c94a
Fix regression preventing new install or reseting to factory default
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/431
2019-02-18 06:18:30 -05:00
Raymond Hill e56757da16
Make Firefox dev build auto-update 2019-02-17 18:11:59 -05:00
Raymond Hill 27f7de7b96
Import translation work from https://crowdin.com/project/ublock 2019-02-17 16:11:36 -05:00
Raymond Hill 363d97fb22
New revision for dev build 2019-02-17 16:05:43 -05:00
Raymond Hill 0d369cda21
Allow use of browser.storage.local as cache storage backend in Firefox
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/409

By default `indexedDB` is used in Firefox for purpose of cache storage
backend.

This commit allows to force the use of `browser.storage.local` instead
as cache storage backend. For this to happen, set `cacheStorageAPI` to
`browser.storage.local` in advanced settings.

Additionally, should `indexedDB` not be available for whatever reason,
uBO will automatically fallback to `browser.storage.local`.
2019-02-17 15:40:09 -05:00
Raymond Hill 3b81841dc0
Properly set resource URL in benchmark loop 2019-02-17 07:45:05 -05:00
Raymond Hill 553ba2c7ed
Make Firefox dev build auto-update 2019-02-16 19:49:31 -05:00
Raymond Hill 5558146649
New revision for dev build 2019-02-16 19:32:05 -05:00
Raymond Hill d63592b11e
Remove obsolete code to translate `|blob:` filters into CSP filters
These filters are to be considered obsolete since they can't be
matched against network requests in the webRequest API.

They were probably meant to work when ABP was pre-webext, which
means they are quite probably obsolete and there is no longer
a point for uBO to conveniently translate them into CSP directives.
2019-02-16 19:25:15 -05:00
Raymond Hill e93062bcdf
Spin-off FilterOrigin flavors into standalone classes
This removes the derivation of FilterOrigin flavors from
FilterOrigin itself and simplify code paths. FilterOrigin
flavors are small specialized classes, no need to
overcomplicate with derivation.

Specifically, this removes an indirect call to reach the
match() method.
2019-02-16 12:16:30 -05:00
Raymond Hill 5733439f62
Leverage whotracks.me's huge dataset of URLs for benchmark purpose
As seen at:
  https://whotracks.me/blog/adblockers_performance_study.html

The requests.json.gz file can be downloaded from:
  https://cdn.cliqz.com/adblocking/requests_top500.json.gz

Copy the file into ./tmp/requests.json.gz

If the file is present when you build uBO using `make-[target].sh` from
the shell, the resulting package will contain `./assets/requests.json`,
which will be looked-up by the method below to launch a benchmark
session.

From uBO's dev console, launch the benchmark:
  µBlock.staticNetFilteringEngine.benchmark();

The usual browser dev tools can be used to obtain useful profiling
data, i.e. start the profiler, call the benchmark method from the
console, then stop the profiler when it completes.

Keep in mind that the measurements at the blog post above where obtained
with ONLY EasyList. The CPU reportedly used was:
  https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i7-6600U+%40+2.60GHz&id=2608

Rename ./tmp/requests.json.gz to something else if you no longer want
./assets/requests.json in the build.
2019-02-15 16:18:03 -05:00
Raymond Hill e589e280c1
Make Firefox dev build auto-update 2019-02-15 08:02:58 -05:00
Raymond Hill 797c2ccecc
New revision for dev build 2019-02-15 07:54:18 -05:00
Raymond Hill b1f7739cba
Import translation work from https://crowdin.com/project/ublock 2019-02-15 07:50:28 -05:00
Raymond Hill 515b7cdcfc
Use proper embedding context when evluating `inline-script`
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/422
2019-02-15 07:37:43 -05:00
Raymond Hill acda682153
Make Firefox dev build auto-update 2019-02-14 16:53:57 -05:00
Raymond Hill b07edb2429
New revision for dev build 2019-02-14 16:49:58 -05:00
Raymond Hill ed7e34fb07
Refactor selfie generation into a more flexible persistence mechanism
The motivation is to address the higher peak memory usage at launch
time with 3rd-gen HNTrie when a selfie was present.

The selfie generation prior to this change was to collect all
filtering data into a single data structure, and then to serialize
that whole structure at once into storage (using JSON.stringify).

However, HNTrie serialization requires that a large UintArray32 be
converted into a plain JS array, which itslef would be indirectly
converted into a JSON string. This was the main reason why peak
memory usage would be higher at launch from selfie, since the JSON
string would need to be wholly unserialized into JS objects, which
themselves would need to be converted into more specialized data
structures (like that Uint32Array one).

The solution to lower peak memory usage at launch is to refactor
selfie generation to allow a more piecemeal approach: each filtering
component is given the ability to serialize itself rather than to be
forced to be embedded in the master selfie. With this approach, the
HNTrie buffer can now serialize to its own storage by converting the
buffer data directly into a string which can be directly sent to
storage. This avoiding expensive intermediate steps such as
converting into a JS array and then to a JSON string.

As part of the refactoring, there was also opportunistic code
upgrade to ES6 and Promise (eventually all of uBO's code will be
proper ES6).

Additionally, the polyfill to bring getBytesInUse() to Firefox has
been revisited to replace the rather expensive previous
implementation with an implementation with virtually no overhead.
2019-02-14 13:33:55 -05:00
Raymond Hill 83a3767a16
Test presence of `firefox` instead of absence of `chromium` 2019-02-12 15:29:20 -05:00
Raymond Hill 2fb4dc8358
Update PSL library to latest official version 2019-02-12 12:00:20 -05:00
Raymond Hill 8c4249a870
Try to not rely on UA to lookup environment flavor
The environment flavor is used to by uBO to for self-configuration.

For users with spoofed UA at the `about:config` level, this might
cause uBO to misconfigure itself. Avoid UA and strictly rely on
browserInfo() for looking up environment parameters.
2019-02-12 11:11:58 -05:00
Raymond Hill e4f3559db1
Remove JPN-0 from stock lists
As per feedback, for example:
- https://www.reddit.com/r/uBlockOrigin/comments/apby98/
2019-02-12 10:23:48 -05:00
Raymond Hill 1e2969c3b0
Update PSL library to last version 2019-02-12 07:59:38 -05:00
Raymond Hill e06cf1de9b
Shield early request handler against re-entrance
Unlikely re-entrance is occurring, but there is no harm
shielding against it -- just in case.
2019-02-12 07:13:37 -05:00
Raymond Hill 0011040cbe
Make Firefox dev build auto-update 2019-02-10 12:31:18 -05:00
Raymond Hill 0c976992ba
Import translation work from https://crowdin.com/project/ublock 2019-02-10 12:26:48 -05:00
Raymond Hill 1eb3250bb2
New revision for dev build 2019-02-10 12:24:55 -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 00236cf54f
Use `esversion` instead of deprecated `esnext` 2019-02-08 09:45:25 -05:00
Raymond Hill 29b10d2151
Tone down logger visual for tab-less network requests 2019-02-05 12:05:00 -05:00
Raymond Hill 74823f6120
New revision for stable release 2019-02-05 07:06:30 -05:00
Raymond Hill d432f78b66
Import translation work from https://crowdin.com/project/ublock 2019-02-05 07:04:52 -05:00
Raymond Hill 3977f8382c
Make Firefox dev build auto-update 2019-02-02 08:24:10 -05:00
Raymond Hill d8a34dfbb4
New revision for release candidate 2019-02-02 08:18:13 -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 54eb608bc3
Make Firefox dev build auto-update 2019-02-01 09:16:36 -05:00
Raymond Hill e9b65259a9
New revision for release candidate 2019-02-01 09:12:55 -05:00