Skip to content

Commit

Permalink
Add a rule for lightbox CMP (#329)
Browse files Browse the repository at this point in the history
* Add a rule for voba-rhein-erft-koeln.de

refs ghostery/broken-page-reports#420

* Rename to lightbox and add relevant websites

* feat: add a detailed rule for lightbox

Co-authored-by: Maxim Tsoy <[email protected]>

---------

Co-authored-by: Maxim Tsoy <[email protected]>
  • Loading branch information
seia-soto and muodov authored Jan 11, 2024
1 parent 09518fc commit b30b412
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rules/autoconsent/lightbox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "lightbox",
"prehideSelectors": [".darken-layer.open,.lightbox.lightbox--cookie-consent"],
"detectCmp": [{ "exists": "body.cookie-consent-is-active div.lightbox--cookie-consent > div.lightbox__content > div.cookie-consent[data-jsb]" }],
"detectPopup": [{ "visible": "body.cookie-consent-is-active div.lightbox--cookie-consent > div.lightbox__content > div.cookie-consent[data-jsb]" }],
"optOut": [{ "click": ".cookie-consent__footer > button[type='submit']:not([data-button='selectAll'])" }],
"optIn": [{ "click": ".cookie-consent__footer > button[type='submit'][data-button='selectAll']" }]
}
6 changes: 6 additions & 0 deletions tests/lightbox.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import generateCMPTests from "../playwright/runner";

generateCMPTests('lightbox', [
'https://voba-rhein-erft-koeln.de',
'https://www.volksbank-eg.de/startseite.html'
]);

0 comments on commit b30b412

Please sign in to comment.