Skip to content

Commit

Permalink
DES-1065: add support of Instagram & Messenger using Consent-O-Matic (#1
Browse files Browse the repository at this point in the history
)

* DES-1065: fix params sent to "SAVE_CONSENT" actions

* DES-1065: add support of instagram

* DES-1065: add support of Facebook

* DES-1065: update dist

* DES-1065: add support for nike.com

* DES-1065: add support for aliexpress.com

* Update rules/autoconsent/aliexpress-com.json

Co-authored-by: Vladimir Zhuravlev <private.face@gmail.com>

---------

Co-authored-by: Vladimir Zhuravlev <private.face@gmail.com>
  • Loading branch information
gpanneti and private-face authored Jun 27, 2023
1 parent 31dde1a commit 8a6ead1
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 10 deletions.
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

0 comments on commit 8a6ead1

Please sign in to comment.