Skip to content

Commit 55e6df9

Browse files
authored
Merge pull request #536 from GravityCore/new-rule/skyscanner
Add rule Skyscanner and create rules/singular/aviation/ subdirectory
2 parents 341a582 + df33446 commit 55e6df9

File tree

2 files changed

+131
-0
lines changed

2 files changed

+131
-0
lines changed

rules-list.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
"https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules/setonosylius.json",
153153
"https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules/sfbx_appconsent.json",
154154
"https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules/sfr.json",
155+
"https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules/skyscanner.json",
155156
"https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules/stcmpv2.json",
156157
"https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules/sirdata.json",
157158
"https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules/snigel.json",

rules/skyscanner.json

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json",
3+
"Skyscanner": {
4+
"detectors": [
5+
{
6+
"presentMatcher": [
7+
{
8+
"type": "css",
9+
"target": {
10+
"selector": ".cookie-banner-wrapper"
11+
}
12+
}
13+
],
14+
"showingMatcher": [
15+
{
16+
"type": "css",
17+
"target": {
18+
"selector": ".cookie-banner-wrapper"
19+
}
20+
}
21+
]
22+
},
23+
{
24+
"presentMatcher": [
25+
{
26+
"type": "css",
27+
"target": {
28+
"selector": "#PrivacySettings_wrapper"
29+
}
30+
}
31+
],
32+
"showingMatcher": [
33+
{
34+
"type": "css",
35+
"target": {
36+
"selector": "#PrivacySettings_wrapper"
37+
}
38+
}
39+
]
40+
}
41+
],
42+
"methods": [
43+
{
44+
"name": "HIDE_CMP",
45+
"action": {
46+
"type": "list",
47+
"actions": [
48+
{
49+
"type": "hide",
50+
"target": {
51+
"selector": ".cookie-banner-wrapper"
52+
}
53+
}
54+
]
55+
}
56+
},
57+
{
58+
"name": "OPEN_OPTIONS",
59+
"action": {
60+
"type": "ifallowall",
61+
"trueAction": {
62+
"type": "click",
63+
"target": {
64+
"selector": "button[data-tracking-element-id='cookie_banner_accept_all']"
65+
}
66+
},
67+
"falseAction": {
68+
"type": "click",
69+
"target": {
70+
"selector": "a[data-tracking-element-id='cookie_banner_manage_settings']"
71+
}
72+
}
73+
}
74+
},
75+
{
76+
"name": "DO_CONSENT",
77+
"action": {
78+
"type": "consent",
79+
"consents": [
80+
{
81+
"matcher": {
82+
"type": "checkbox",
83+
"target": {
84+
"selector": "#PrivacySettings_switch-Information"
85+
}
86+
},
87+
"toggleAction": {
88+
"type": "click",
89+
"target": {
90+
"selector": "#PrivacySettings_switch-Information"
91+
}
92+
},
93+
"type": "B"
94+
},
95+
{
96+
"matcher": {
97+
"type": "checkbox",
98+
"target": {
99+
"selector": "#PrivacySettings_switch-Adverts"
100+
}
101+
},
102+
"toggleAction": {
103+
"type": "click",
104+
"target": {
105+
"selector": "#PrivacySettings_switch-Adverts"
106+
}
107+
},
108+
"type": "F"
109+
}
110+
]
111+
}
112+
},
113+
{
114+
"name": "SAVE_CONSENT",
115+
"action": {
116+
"type": "ifcss",
117+
"target": {
118+
"selector": "#PrivacySettings_switch-Information"
119+
},
120+
"trueAction": {
121+
"type": "click",
122+
"target": {
123+
"selector": ".bpk-button--primary"
124+
}
125+
}
126+
}
127+
}
128+
]
129+
}
130+
}

0 commit comments

Comments
 (0)