Skip to content

Commit

Permalink
Aliexpress & temu (#484)
Browse files Browse the repository at this point in the history
* support mobile aliexpress

* Update rule for temu
  • Loading branch information
muodov authored Aug 19, 2024
1 parent 66cda76 commit f1b4224
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 21 deletions.
40 changes: 25 additions & 15 deletions rules/autoconsent/aliexpress.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,43 @@
"prehideSelectors": ["#gdpr-new-container"],
"detectCmp": [
{
"exists": "#gdpr-new-container"
"exists": "#gdpr-new-container,#voyager-gdpr > div"
}
],
"detectPopup": [
{
"visible": "#gdpr-new-container"
"visible": "#gdpr-new-container,#voyager-gdpr > div"
}
],
"optIn": [
{
"waitForThenClick": "#gdpr-new-container .btn-accept"
"waitForThenClick": "#gdpr-new-container .btn-accept,#voyager-gdpr > div > div > button:nth-child(1)"
}
],
"optOut": [
{
"waitForThenClick": "#gdpr-new-container .btn-more"
},
{
"waitFor": "#gdpr-new-container .gdpr-dialog-switcher"
},
{
"click": "#gdpr-new-container .switcher-on",
"all": true,
"optional": true
},
{
"click": "#gdpr-new-container .btn-save"
"if": { "exists": "#voyager-gdpr > div" },
"then": [
{
"waitForThenClick": "#voyager-gdpr > div > div > button:nth-child(2)"
}
],
"else": [
{
"waitForThenClick": "#gdpr-new-container .btn-more"
},
{
"waitFor": "#gdpr-new-container .gdpr-dialog-switcher"
},
{
"click": "#gdpr-new-container .switcher-on",
"all": true,
"optional": true
},
{
"click": "#gdpr-new-container .btn-save"
}
]
}
]
}
14 changes: 8 additions & 6 deletions rules/autoconsent/temu.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@
"name": "temu",
"vendorUrl": "https://temu.com",
"runContext": {
"urlPattern": "^https://[^/]*temu\\.com/"
"urlPattern": "^https://([a-z0-9-]+\\.)?temu\\.com/"
},
"prehideSelectors": ["._2d-8vq-W,._1UdBUwni"],
"prehideSelectors": [],
"detectCmp": [
{
"exists": "._3YCsmIaS"
"exists": "div > div > div > div > span[href*=\"/cookie-and-similar-technologies-policy.html\"]"
}
],
"detectPopup": [
{
"visible": "._3YCsmIaS"
"visible": "div > div > div > div > span[href*=\"/cookie-and-similar-technologies-policy.html\"]"
}
],
"optIn": [
{
"waitForThenClick": "._3fKiu5wx._3zN5SumS._3tAK973O.IYOfhWEs.VGNGF1pA"
"waitForThenClick": "div > div > div:has(> div > span[href*=\"/cookie-and-similar-technologies-policy.html\"]) > [role=button]:nth-child(3)"
}
],
"optOut": [
{
"waitForThenClick": "._3fKiu5wx._1_XToJBF._3tAK973O.IYOfhWEs.VGNGF1pA"
"if": { "exists": "xpath///span[contains(., 'Alle afwijzen') or contains(., 'Reject all') or contains(., 'Tümünü reddet') or contains(., 'Odrzuć wszystko')]" },
"then": [{ "waitForThenClick": "xpath///span[contains(., 'Alle afwijzen') or contains(., 'Reject all') or contains(., 'Tümünü reddet') or contains(., 'Odrzuć wszystko')]" }],
"else": [{ "waitForThenClick": "div > div > div:has(> div > span[href*=\"/cookie-and-similar-technologies-policy.html\"]) > [role=button]:nth-child(2)" }]
}
]
}

0 comments on commit f1b4224

Please sign in to comment.