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

Rules work on desktop but not in IOS #424

Open
3rdQuasar opened this issue Jan 9, 2024 · 6 comments
Open

Rules work on desktop but not in IOS #424

3rdQuasar opened this issue Jan 9, 2024 · 6 comments

Comments

@3rdQuasar
Copy link

{
"$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json",
"youtube_popup": {
"detectors": [
{
"presentMatcher": [
{
"type": "css",
"target": {
"selector": "[role="dialog"] a[href^="https://policies.google.com/privacy"]"
}
},
{
"type": "css",
"target": {
"selector": "[role="dialog"] a[href^="https://policies.google.com/technologies/cookies"]"
}
},
{
"type": "css",
"target": {
"selector": "[role="dialog"] a[href^="https://policies.google.com/terms"]"
}
}
],
"showingMatcher": [
{
"type": "css",
"target": {
"selector": "[role="dialog"]",
"textFilter": [
"g.co/privacytools"
]
}
}
]
}
],
"methods": [
{
"name": "HIDE_CMP"
},
{
"action": {
"type": "click",
"target": {
"selector": "[role="dialog"] button, [role="dialog"] a",
"textFilter": [
"Reject all",
"Rifiuta tutto"
]
}
},
"name": "OPEN_OPTIONS"
},
{
"name": "DO_CONSENT"
},
{
"name": "SAVE_CONSENT"
},
{
"name": "UTILITY"
}
]
}
}

@3rdQuasar
Copy link
Author

so it seem doesnt work on https://m.youtube.com/ but it work on https://www.youtube.com/

@3rdQuasar
Copy link
Author

and can i ask some explanation cause im newbie about json
why [role="dialog"] its needed? cause saw other rules dont need it

@3rdQuasar
Copy link
Author

{
"$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json",
"youtube_mobile_popup2": {
"detectors": [
{
"presentMatcher": [
{
"type": "css",
"target": {
"selector": ".consent-bump-v2-lightbox-header-eom"
}
}
],
"showingMatcher": [
{
"type": "css",
"target": {
"selector": ".consent-bump-v2-lightbox-header-eom",
"displayFilter": true
}
}
]
}
],
"methods": [
{
"name": "HIDE_CMP"
},
{
"name": "OPEN_OPTIONS"
},
{
"action": {
"type": "list",
"actions": [
{
"type": "wait",
"waitTime": 250
},
{
"type": "multiclick",
"target": {
"selector": ".eom-reject",
"textFilter": [
"Rifiuta tutto",
"Reject all"
]
}
}
]
},
"name": "DO_CONSENT"
},
{
"name": "SAVE_CONSENT"
},
{
"name": "UTILITY"
}
]
}
}

@3rdQuasar
Copy link
Author

I tried writing some new code but still not working can someone help/teach me how to do?

@AUToelboell
Copy link
Collaborator

Hi, thanks for the report. I have a hard time reproducing the issue you are pointing out. Can you describe it a bit better, what browser and platform are you using. For your questions regarding json and [role="dialog"] this is a CSS selector which is being matched on. I highly recommend you to use the inbuilt rule editor. which can be found under the plugin ->rule-list -> Open rule editor. It takes care of the exact syntax, and your only concern is which methods you are using and what it shall match on.

@3rdQuasar
Copy link
Author

3rdQuasar commented Jan 10, 2024

I'm using safari on IOS 16.2
And yeah I'm using your inbuilt editor but it can't drag and drop on mobile
I copied rule for google popup and edit to click on reject all and it worked
But I spent last night trying to make it work for YouTube mobile site it doesn't work
the second rule I copied from instagram's rule and tried to select directly the class, in extension it say successfully filled and clicked but the CMP it's still there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants