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

DES-1065: add support of Instagram & Messenger using Consent-O-Matic #1

Merged
merged 7 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/addon-firefox/content.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1629,15 +1629,15 @@
await this.executeAction("OPEN_OPTIONS");
await this.executeAction("HIDE_CMP");
await this.executeAction("DO_CONSENT", []);
await this.executeAction("SAVE_CONSENT");
await this.executeAction("SAVE_CONSENT", []);
return true;
}
async optIn() {
await this.executeAction("HIDE_CMP");
await this.executeAction("OPEN_OPTIONS");
await this.executeAction("HIDE_CMP");
await this.executeAction("DO_CONSENT", ['D', 'A', 'B', 'E', 'F', 'X']);
await this.executeAction("SAVE_CONSENT");
await this.executeAction("SAVE_CONSENT", ['D', 'A', 'B', 'E', 'F', 'X']);
return true;
}
async openCmp() {
Expand Down
4 changes: 2 additions & 2 deletions dist/addon-mv3/content.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1629,15 +1629,15 @@
await this.executeAction("OPEN_OPTIONS");
await this.executeAction("HIDE_CMP");
await this.executeAction("DO_CONSENT", []);
await this.executeAction("SAVE_CONSENT");
await this.executeAction("SAVE_CONSENT", []);
return true;
}
async optIn() {
await this.executeAction("HIDE_CMP");
await this.executeAction("OPEN_OPTIONS");
await this.executeAction("HIDE_CMP");
await this.executeAction("DO_CONSENT", ['D', 'A', 'B', 'E', 'F', 'X']);
await this.executeAction("SAVE_CONSENT");
await this.executeAction("SAVE_CONSENT", ['D', 'A', 'B', 'E', 'F', 'X']);
return true;
}
async openCmp() {
Expand Down
2 changes: 1 addition & 1 deletion dist/autoconsent.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/autoconsent.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/autoconsent.playwright.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/cmps/consentomatic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class ConsentOMaticCMP implements AutoCMP {
await this.executeAction("OPEN_OPTIONS");
await this.executeAction("HIDE_CMP");
await this.executeAction("DO_CONSENT", []);
await this.executeAction("SAVE_CONSENT");
await this.executeAction("SAVE_CONSENT", []);
return true;
}

Expand All @@ -89,7 +89,7 @@ export class ConsentOMaticCMP implements AutoCMP {
await this.executeAction("OPEN_OPTIONS");
await this.executeAction("HIDE_CMP");
await this.executeAction("DO_CONSENT", ['D', 'A', 'B', 'E', 'F', 'X']);
await this.executeAction("SAVE_CONSENT");
await this.executeAction("SAVE_CONSENT", ['D', 'A', 'B', 'E', 'F', 'X']);
return true;
}
async openCmp(): Promise<boolean> {
Expand Down
12 changes: 12 additions & 0 deletions rules/autoconsent/aliexpress-com.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "aliexpress.com",
"runContext": {
"urlPattern": "^https://([a-z0-9-]+\\.)?aliexpress\\.com/"
},
"cosmetic": true,
"prehideSelectors": [".global-gdpr-container"],
"detectCmp": [{ "exists": ".global-gdpr-container" }],
"detectPopup": [{ "visible": ".global-gdpr-container" }],
"optIn": [{ "click": "div.global-gdpr-container div.global-gdpr-btn-wrap button[data-role=\"gdpr-accept\"]" }],
"optOut": [{ "click": "div.global-gdpr-container div.global-gdpr-btn-wrap button[data-role=\"gdpr-reject\"]" }]
}
12 changes: 12 additions & 0 deletions rules/autoconsent/nike-com.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "nike.com",
"runContext": {
"urlPattern": "^https://www\\.nike\\.com/"
},
"cosmetic": true,
"prehideSelectors": ["div.cookie-dialog-base"],
"detectCmp": [{ "exists": "div.cookie-dialog-base" }],
"detectPopup": [{ "visible": "div.cookie-dialog-base" }],
"optIn": [{ "click": "div.cookie-dialog-base button.dialog-actions-accept-btn" }],
"optOut": [{ "click": "div.cookie-dialog-base button.dialog-actions-decline-btn" }]
}
2 changes: 1 addition & 1 deletion rules/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const consentOMaticCommit = "master";
const consentOMaticBaseUrl = `https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/${consentOMaticCommit}/rules/`;
const consentOMaticDir = path.join(__dirname, "consentomatic");
const consentOMaticInclude = [
'didomi.io', 'oil', 'optanon', 'quantcast2', 'springer', 'wordpress_gdpr', 'sirdata', 'sourcepoint_frame', 'sourcepoint'
'didomi.io', 'oil', 'optanon', 'quantcast2', 'springer', 'wordpress_gdpr', 'sirdata', 'sourcepoint_frame', 'sourcepoint', 'instagram', 'facebook'
]
const buildConsentOMatic = (async () => {
const comRules = {};
Expand Down