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 quoted scriptlet arguments #34170

Closed
antonok-edm opened this issue Nov 8, 2023 · 8 comments · Fixed by brave/brave-core#20888
Closed

Support quoted scriptlet arguments #34170

antonok-edm opened this issue Nov 8, 2023 · 8 comments · Fixed by brave/brave-core#20888

Comments

@antonok-edm
Copy link
Collaborator

It's currently undocumented in the uBlock Origin wiki at the moment, but uBO has supported a quoted scriptlet argument syntax for some time now. Many adblock rules designed to counter cookie consent notices take advantage of that syntax.

adblock-rust has supported this feature as of v0.8.3.

@kjozwiak
Copy link
Member

The above requires 1.61.75 or higher for 1.61.x verification 👍

@MadhaviSeelam
Copy link

MadhaviSeelam commented Nov 14, 2023

Verification PASSED using

Brave | 1.61.75 Chromium: 119.0.6045.134 (Official Build) beta (64-bit)
-- | --
Revision | 1b1191cb2465b2b90a5e8fea4a63aed1cfca47f5
OS | Windows 11 Version 22H2 (Build 22621.2428)
  1. Installed 1.61.75
  2. launched Brave
  3. loaded notion.so
  4. confirmed cookie banner along bottom of the viewport
  5. opened brave://settings/shields/filters in a new tab
  6. unchecked EasyList Cookie from Filter lists
  7. added the following rule to the Create custom filters box supplied by @antonok-edm over Slack:
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
  1. pressed Save changes button
  2. refreshed the site, notion.so

Confirmed the cookie banner disappeared on reload with the new ruleset

example example example
image image image

@stephendonner
Copy link

Verified PASSED using

Brave | 1.61.75 Chromium: 119.0.6045.134 (Official Build) beta (x86_64)
-- | --
Revision | 1b1191cb2465b2b90a5e8fea4a63aed1cfca47f5
OS | macOS Version 11.7.10 (Build 20G1427)

Steps:

  1. installed 1.61.75
  2. launched Brave
  3. loaded notion.so
  4. confirmed cookie banner along bottom of the viewport
  5. opened brave://adblock
  6. unchecked EasyList Cookie from the Filter LIsts section
  7. added the following rule supplied by @antonok-edm over Slack:
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
  1. reloaded the page

Confirmed the cookie banner disappeared on reload with the new ruleset

example example example
Screen Shot 2023-11-14 at 3 26 58 PM Screen Shot 2023-11-14 at 3 27 40 PM Screen Shot 2023-11-14 at 3 28 09 PM

@kjozwiak
Copy link
Member

Removing the QA Pass label as the above was uplifted into 1.60.x so we'll need to re-check/ensure it's working within 1.60.x before releasing. The above requires 1.60.120 or higher for 1.60.x verification.

@GeetaSarvadnya
Copy link

Verification PASSED on

Brave | 1.60.124 Chromium: 119.0.6045.163 (Official Build) (64-bit)
-- | --
Revision | 803c85554783c998a840f4b211c94236409a9928
OS | Windows 10 Version 22H2 (Build 19045.3693)

Steps:

  1. installed 1.60.124
  2. launched Brave
  3. loaded notion.so
  4. confirmed cookie banner along bottom of the viewport
  5. opened brave://adblock
  6. unchecked EasyList Cookie from the Filter LIsts section
  7. added the following rule supplied by @antonok-edm over Slack:
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
  1. reloaded the page

Confirmed the cookie banner disappeared on reload with the new ruleset

example example example
image image image

@LaurenWags
Copy link
Member

LaurenWags commented Nov 27, 2023

Verified with

Brave | 1.60.124 Chromium: 119.0.6045.163 (Official Build) (x86_64)
-- | --
Revision | 803c85554783c998a840f4b211c94236409a9928
OS | macOS Version 13.6.1 (Build 22G313)
Upgrade Profile - PASSED
  1. installed 1.60.118
  2. launched Brave
  3. loaded notion.so
  4. confirmed cookie banner along bottom of the viewport
  5. opened brave://adblock
  6. unchecked EasyList Cookie from the Filter LIsts section
  7. added the following rule and saved it:
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
  1. reloaded the notion.so page
Step 4 Step 7 Step 8
4 7 8
  1. Upgraded to 1.60.124
  2. Confirmed brave://settings/shields/filters was still as expected
  3. Viewed notion.so
  4. Confirmed no cookie banner
Step 10 Step 12
10 12
Clean Profile - PASSED
  1. installed 1.60.124
  2. launched Brave
  3. loaded notion.so
  4. confirmed cookie banner along bottom of the viewport
  5. opened brave://adblock
  6. unchecked EasyList Cookie from the Filter LIsts section
  7. added the following rule and saved changes:
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
  1. reloaded the page

Confirmed the cookie banner disappeared on reload with the new ruleset

Step 4 Step 7 Step 8
4 7 8

@btlechowski
Copy link

btlechowski commented Nov 27, 2023

Verified with

Brave 1.60.124 Chromium: 119.0.6045.163 (Official Build) (64-bit)
Revision 803c85554783c998a840f4b211c94236409a9928
OS Linux

Steps:

  1. installed 1.60.124
  2. launched Brave
  3. loaded notion.so
  4. confirmed cookie banner along bottom of the viewport
  5. opened brave://adblock
  6. unchecked EasyList Cookie from the Filter LIsts section
  7. added the following rule:
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
  1. reloaded the page

Confirmed the cookie banner disappeared on reload with the new ruleset

image image

@kjozwiak
Copy link
Member

kjozwiak commented Nov 29, 2023

Verification PASSED on Pixel 6 running Android 14 using the following build(s):

Brave | 1.60.125 Chromium: 119.0.6045.199 (Official Build) (64-bit)
--- | ---
Revision | 9c1f9e267d7ef50aefbe434e616e05290536926b
OS | Android 14; Build/AP11.231020.016.A1; 34; REL
  • installed 1.60.125 Chromium: 119.0.6045.199 and launched Brave
  • loaded notion.so
  • confirmed cookie banner along bottom of the viewport
  • opened brave://adblock
  • unchecked EasyList Cookie from the Filter LIsts section
  • added the following rule and reloaded the page/ensured that the cookie banner has been removed/doesn't appear
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
Example Example Example
Screenshot_20231129-115436 Screenshot_20231129-115810 Screenshot_20231129-115826

Verification PASSED on Samsung Galaxy Tab S8 Ultra running Android 13 using the following build(s):

Brave | 1.60.125 Chromium: 119.0.6045.199 (Official Build) (64-bit)
--- | ---
Revision | 9c1f9e267d7ef50aefbe434e616e05290536926b
OS | Android 13; Build/TP1A.220624.014; 33; REL
  • installed 1.60.125 Chromium: 119.0.6045.199 and launched Brave
  • loaded notion.so
  • confirmed cookie banner along bottom of the viewport
  • opened brave://adblock
  • unchecked EasyList Cookie from the Filter LIsts section
  • added the following rule and reloaded the page/ensured that the cookie banner has been removed/doesn't appear
notion.so##+js(set-cookie, notion_check_cookie_consent, true)
notion.so##+js(trusted-set-cookie, notion_cookie_consent, '{%22id%22:%2282a41727-b652-4011-a0a4-13a4499c039a%22%2C%22permission%22:{%22necessary%22:true%2C%22preference%22:true%2C%22performance%22:false%2C%22targeting%22:false}%2C%22policy_version%22:%22v8%22}')
Example Example Example Example
Screenshot_20231129_120622_Brave Screenshot_20231129_120703_Brave Screenshot_20231129_120708_Brave Screenshot_20231129_120716_Brave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment