Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support #@#+js() syntax for blanket scriptlet exception #33766

Closed
antonok-edm opened this issue Oct 20, 2023 · 6 comments · Fixed by brave/brave-core#20614
Closed

Support #@#+js() syntax for blanket scriptlet exception #33766

antonok-edm opened this issue Oct 20, 2023 · 6 comments · Fixed by brave/brave-core#20614
Assignees
Labels
dependencies Pull requests that update a dependency file feature/shields/adblock Blocking ads & trackers with Shields OS/Android Fixes related to Android browser functionality OS/Desktop QA Pass - Android ARM QA Pass-Win64 QA/Yes release-notes/include

Comments

@antonok-edm
Copy link
Collaborator

See https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#scriptlet-injection

This is supported as of adblock-rust 0.8.2.

@kjozwiak
Copy link
Member

The above requires 1.60.102 or higher for 1.60.x verification 👍

@kjozwiak
Copy link
Member

Verification PASSED on Win 11 x64 using the following build(s):

Brave | 1.60.102 Chromium: 118.0.5993.96 (Official Build) beta (64-bit)
-- | --
Revision | 3598a9fc6b7752181feb25caa131bc386d6d054c
OS | Windows 11 Version 22H2 (Build 22621.2428)

Using the STR/Cases outlined via brave/brave-core#20614 (comment), went through the following:

Example Example Example Example
image image image image

@hffvld hffvld added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Oct 30, 2023
@hffvld
Copy link
Contributor

hffvld commented Oct 30, 2023

Verified on Pixel 7 using version(s):

Device/OS: Pixel 7 [panther_beta-user 14 U1B2.230922.010 release-keys]
Brave build: 1.60.106
Chromium: 119.0.6045.59 (Official Build) (64-bit) 
Revision: 16064193dde8c55f64dabd32f125c0cd9380f96a

STEPS:

  1. Followed the steps from Update adblock-rust to v0.8.2 brave-core#20614 (comment)

ACTUAL RESULTS:

  • Verified that the result is {} when custom filter is example.com##+js(json-prune, test) and pointing to JSON.parse('{"test": true}')
  • Verified that result is {test: true} when custom filter is example.com##+js(json-prune, test), example.com#@#+js() and pointing to JSON.parse('{"test": true}')

1 2
1 2
1 2

@hffvld hffvld added QA Pass - Android ARM and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Oct 30, 2023
@superlex
Copy link

superlex commented Nov 2, 2023

Hi,
just updated to Brave 1.60.110.

example.org##+js(set-cookie, cookie, 1)
example.org#@#+js()

works

example.org##+js(set-cookie, cookie, 1)
#@#+js()

doesn't work.

@antonok-edm
Copy link
Collaborator Author

@superlex yes, at the moment all cosmetic filters in Brave must be prefixed with a list of domains . We don't currently support wildcard injections (or exceptions).

@superlex
Copy link

superlex commented Nov 2, 2023

Oh ok, thanks for your reply 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file feature/shields/adblock Blocking ads & trackers with Shields OS/Android Fixes related to Android browser functionality OS/Desktop QA Pass - Android ARM QA Pass-Win64 QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants