Show on-page dialog to users who encounter YouTube's ad wall
Background / User story
Some websites put up an ad wall for restricting access to certain visitors. Recently, we've been seeing similar experiments on YouTube and would therefore like to show an on-page dialog for users who see that wall, in order to provide them with helpful information on what they can do.
Related AdBlock issue: adblockinc/ext/adblock/adblock#473
What to change
- Design: The latest version of this solution, AKA the 'landing page' option is visible here.
- Research: Current documentation can be found on our Notion page
- Spec: spec!427 (merged)
- Legal: TBD
- Detect YouTube's ad wall.
- Locally trigger showing an on-page dialog using some predefined content, depending on on whether YouTube is allowlisted.
- No translations for the dialog content necessary for now. Those will be provided in a subsequent release. Until then, the dialog should be shown to all users.
Hints for testers
- The dialog is disabled by default, but you can change the
isEnabledconstant in src/yt-wall-detection/shared/detection.ts from
trueto enable it. Alternatively, you can change its value in the generated extension builds where you find it in both background.js and yt-wall-detection.preload.js.
- You can trigger the dialog by visiting YouTube and running
- The dialog will only be shown once per page load.
- Once the user has clicked the 'Learn More' button or clicked on close button, the dialog should no longer be shown.
- An error message may be shown in the console when the dialog is shown, which is due to https://gitlab.com/adblockinc/ext/adblockplus/adblockplusui/-/issues/1494 .
- On-page dialogs triggered from an IPM command should not be able to specify
- Due to a regression in #1512 (closed), IPM commands for showing on-page dialogs are being rejected (see #1558 (closed)).
Hints for translators