Skip to content

Commit

Permalink
add rule for medium.com
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov committed Aug 12, 2024
1 parent d2bb7aa commit c6f6d47
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
31 changes: 31 additions & 0 deletions rules/autoconsent/medium.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "medium",
"vendorUrl": "https://medium.com",
"cosmetic": true,
"runContext": {
"main": true,
"frame": false,
"urlPattern": "^https://([a-z0-9-]+\\.)?medium\\.com/"
},
"prehideSelectors": [],
"detectCmp": [
{
"exists": "div:has(> div > div > div[role=alert] > a[href^=\"https://policy.medium.com/medium-privacy-policy-\"])"
}
],
"detectPopup": [
{
"visible": "div:has(> div > div > div[role=alert] > a[href^=\"https://policy.medium.com/medium-privacy-policy-\"])"
}
],
"optIn": [
{
"waitForThenClick": "[data-testid=close-button]"
}
],
"optOut": [
{
"hide": "div:has(> div > div > div[role=alert] > a[href^=\"https://policy.medium.com/medium-privacy-policy-\"])"
}
]
}
5 changes: 5 additions & 0 deletions tests/medium.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import generateCMPTests from "../playwright/runner";

generateCMPTests('medium', [
'https://medium.com/',
]);

0 comments on commit c6f6d47

Please sign in to comment.