Commit Graph

1829 Commits

Author SHA1 Message Date
Raymond Hill 287f7711aa
Import translation work from https://crowdin.com/project/ublock 2023-10-21 08:19:28 -04:00
Raymond Hill 6af4494946
[mv3] Honor scriptlets' target world in Firefox
When the target world of a scriptlet is the ISOLATED one,
skip Blob-based injection in Firefox, as the current world
is always the ISOLATED one. This should make ISOLATED
world-based scriptlets more reliable (i.e. execute sooner)
in Firefox.
2023-10-21 07:11:12 -04:00
Raymond Hill 2e4525fe3c
Add new static network filter option: `urltransform`
The `urltransform` option allows to redirect a non-blocked network
request to another URL. There are restrictions on its usage:

- require a trusted source -- thus uBO-maintained lists or user
  filters
- the `urltransform` value must start with a `/`

If at least one of these conditions is not fulfilled, the filter
will be invalid and rejected.

The requirement to start with `/` is to enforce that only the path
part of a URL can be modified, thus ensuring the network request
is redirected to the same scheme and authority (as defined at
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax).

Usage example (redirect requests for CSS resources to a non-existing
resource, for demonstration purpose):

    ||iana.org^$css,urltransform=/notfound.css

Name of this option is inspired from DNR API:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/URLTransform

This commit required to bring the concept of "trusted source" to
the static network filtering engine.
2023-10-16 09:47:29 -04:00
Raymond Hill d25306f300
Modify `manifest.json` for other platforms
As per 0325dcdcb4
2023-10-14 13:55:46 -04:00
Raymond Hill 0325dcdcb4
Add ability to update lists through links with specifically crafted URLs
As per discussion with uBO volunteers.

Volunteers offering support for uBO will be able to craft links with
specially formed URLs, which once clicked will cause uBO to automatically
force an update of specified filter lists.

The URL must be crafted as shown in the example below:

https://ublockorigin.github.io/uAssets/update-lists.html?listkeys=ublock-filters,easylist

Where the `listkeys` parameter is a comma-separated list of tokens
corresponding to filter lists. If a token does not match an enabled
filter list, it will be ignored.

The ability to update filter lists through a specially crafted link
is available only on uBO's own support sites:

- https://github.com/uBlockOrigin/
- https://reddit.com/r/uBlockOrigin/
- https://ublockorigin.github.io/

Additionally, a visual cue has been added in the "Filter lists" pane
to easily spot the filter lists which have been recently updated, where
"recently" is currently defined as less than an hour ago.
2023-10-14 13:41:49 -04:00
Raymond Hill fb42411efb
Add `browser_specific_settings.gecko_android` to Firefox manifests
Reference:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings
2023-10-11 12:32:38 -04:00
Raymond Hill 3a5606125d
Import translation work from https://crowdin.com/project/ublock 2023-10-10 10:42:14 -04:00
Raymond Hill bd71d131a8
Catch unhandled exceptions
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/77
2023-10-05 11:25:28 -04:00
Raymond Hill 7416340144
Prune rules with invalid regex-based filter for all realms
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/77
2023-10-03 10:51:47 -04:00
Raymond Hill b95c90ba7c
Import translation work from https://crowdin.com/project/ublock 2023-09-22 09:36:01 -04:00
Raymond Hill d005e3f3ac
[mv3] Fix glitchy popup panel when width increases
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/66
2023-09-16 12:23:47 -04:00
Raymond Hill ee6de37b6e
[mv3] Rework dashboard to avoid usage of `iframe`
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/67
2023-09-16 11:46:39 -04:00
Raymond Hill ba8820fe31
Import translation work from https://crowdin.com/project/ublock 2023-09-08 09:19:26 -04:00
Raymond Hill f8a83fff7c
[mv3] Fine tune for small screens 2023-08-22 20:08:26 -04:00
Raymond Hill 3c7f35ed9c
Import translation work from https://crowdin.com/project/ublock 2023-08-22 10:50:04 -04:00
Raymond Hill f9ba65b829
[mv3] Put icon in nav bar by default
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2781
2023-08-20 09:35:16 -04:00
Raymond Hill ca6adbca56
[mv3] Point to new uBO version 2023-08-20 08:54:32 -04:00
Raymond Hill 21bb4e56ed
Put uBO's icon in nav bar by default
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2781
2023-08-20 08:38:42 -04:00
Raymond Hill b1f0c5b773
Typo 2023-08-19 19:56:00 -04:00
Raymond Hill 0ad456e905
[mv3] Rename `uBOL-issues` repo to `uBOL-home`
From now on, new uBOL releases will go into uBOL-home repo.
2023-08-19 11:26:33 -04:00
Raymond Hill bcc0803bb5
[mv3] Use specific commit URL to pick uBO repo version 2023-08-19 08:50:20 -04:00
Raymond Hill 857abb380b
[mv3] Add support for converting `^responseheader()` filters to DNR
Additionally, finalize versioning scheme for uBOL. Since most updates
will be simply related to update rulesets, the version will from now
on reflects the date at which the extension package was created:

  year.month.day.minutes

So for example:

  2023.8.19.690
2023-08-19 07:48:14 -04:00
Raymond Hill eb235404bd
Use 'wasm-unsafe-eval' instead of deprecated 'wasm-eval'
Reference:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_webassembly_execution
2023-08-18 10:01:08 -04:00
Raymond Hill 17ae7f3459
[mv3] Prepare new uBO Lite version to fix regression 2023-08-15 10:23:09 -04:00
Raymond Hill 2a6c1d30b4
Fix regression in vAPI.warSecret guard code
Related commit:
https://github.com/gorhill/uBlock/commit/bf591d93fb
2023-08-14 13:39:27 -04:00
Raymond Hill bf591d93fb
Imrpove `no-xhr-if` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2773

The `randomize` paramater introduced in https://github.com/gorhill/uBlock/commit/418087de9c
is now named `directive`, and beside the `true` value which is meant
to respond with a random 10-character string, it can now take the
following value:

  war:[web_accessible_resource name]

In order to mock the XHR response with a web accessible resource. For
example:

  piquark6046.github.io##+js(no-xhr-if, adsbygoogle.js, war:googlesyndication_adsbygoogle.js)

Will cause the XHR performed by the webpage to resolve to the content
of `/web_accessible_resources/googlesyndication_adsbygoogle.js`.

Should the resource not exist, the empty string will be returned.
2023-08-14 10:03:50 -04:00
Raymond Hill 4feb59435a
Typo 2023-08-13 13:28:02 -04:00
Raymond Hill 376bddb0ff
Update README.md 2023-08-12 08:06:31 -04:00
Raymond Hill f049aea65e
Provide instructions on how to build uBO Lite
Required by AMO when submitting an extension to be hosted on AMO.
2023-08-12 08:02:42 -04:00
Raymond Hill a9a78d415d
[mv3] Various approach to minimize DNR ruleset file
Related issue:
https://github.com/mozilla/addons-server/issues/4717
2023-08-11 20:42:03 -04:00
Raymond Hill 3d60d1bde4
Comment 2023-08-11 17:55:29 -04:00
Raymond Hill bb41d9594f
[mv3] Use workaround to inject scriptlets in Firefox
Additionally:

Use `export UBO_VERSION=local` at the console to build MV3 extension using
current version of uBO code base. By default, the version is taken from
`./platform/mv3/ubo-version' and usually set to last stable release.
2023-08-11 13:22:25 -04:00
Raymond Hill e295822f93
Build uBO Lite on top of stable release of uBO 2023-08-10 13:08:15 -04:00
Raymond Hill b9f3523c95
[mv3] Add managed setting to disable first-run page
Related discussion:
- https://github.com/uBlockOrigin/uBOL-issues/discussions/61

Example of usage (chromium/linux):

    {
      "3rdparty": {
        "extensions": {
          "ddkjiahejlhfcafbddmgiahcphecmpfh": {
            "disableFirstRunPage": true
          }
        }
      }
    }
2023-07-29 09:34:24 -04:00
Viktor Szépe c23a9ada33
Fix typos 2023-07-23 10:01:08 -04:00
Raymond Hill ef42819b33
Import translation work from https://crowdin.com/project/ublock 2023-07-17 09:36:56 -04:00
Raymond Hill b107040d89
[mv3] Fix strict_min_version for Firefox 2023-07-13 18:02:10 -04:00
Raymond Hill 4a83b80328
[mv3] Properly enforce generic cosmetic exception filters
Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/58
2023-07-11 14:38:35 -04:00
Raymond Hill 0f6400c160
[mv3] Add support for `permissions=` filter option
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2714
2023-07-10 11:56:57 -04:00
Raymond Hill 634fdde465
[mv3] Prevent enabling more filter lists than allowed
Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/56#issuecomment-1627692213
2023-07-09 09:25:38 -04:00
Raymond Hill 9871843ffe
Import translation work from https://crowdin.com/project/ublock 2023-07-09 08:41:08 -04:00
Raymond Hill 9935f301c8
[mv3] Add missing file related to previous commit
Related commit:
- https://github.com/gorhill/uBlock/commit/872eafa37858
2023-07-06 20:01:52 -04:00
Raymond Hill 872eafa378
[mv3] Add support for highly generic cosmetic filters
Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/54
2023-07-06 15:45:45 -04:00
Raymond Hill 44b281e517
Import translation work from https://crowdin.com/project/ublock 2023-07-01 10:33:02 -04:00
Raymond Hill bec4dea155
Minor code review 2023-06-23 20:44:44 -04:00
Raymond Hill 7ba85472d7
[mv3] Properly distinguish trust level when compiling scriptlets
Since in uBOL filter lists from various sources are combined into
a single list, there must be a way to turn on/off trust level
inside the resulting combined filter list so as to be able to
validate the trust level of filters requiring trust.

This commit adds new parser directives understood only by MV3
compiler to turn on/off trust flag internally.
2023-06-23 08:27:07 -04:00
Raymond Hill 6a817b8258
Revert back to EasyList Cookie Notices 2023-06-21 10:08:28 -04:00
Raymond Hill 49b3ce58bb
Import translation work from https://crowdin.com/project/ublock 2023-06-19 10:17:36 -04:00
Raymond Hill 3b70d0e134
[mv3] Drop useless property in generated content scripts 2023-06-18 14:34:43 -04:00
Raymond Hill 683888108c
Import translation work from https://crowdin.com/project/ublock 2023-06-16 11:38:31 -04:00