@duckduckgo/autoconsent 10.7.0 → 10.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,8 @@
46
46
  },
47
47
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
48
48
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
49
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
50
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
49
51
  // declarative rules
50
52
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
51
53
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -493,6 +493,8 @@
493
493
  },
494
494
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
495
495
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
496
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
497
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
496
498
  // declarative rules
497
499
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
498
500
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -1038,7 +1040,7 @@
1038
1040
  this._optInDone = false;
1039
1041
  }
1040
1042
  get hasSelfTest() {
1041
- return false;
1043
+ return true;
1042
1044
  }
1043
1045
  get isIntermediate() {
1044
1046
  if (this._optInDone) {
@@ -1085,6 +1087,7 @@
1085
1087
  return true;
1086
1088
  }
1087
1089
  async test() {
1090
+ await this.wait(500);
1088
1091
  return await this.mainWorldEval("EVAL_TRUSTARC_TOP");
1089
1092
  }
1090
1093
  };
@@ -1101,7 +1104,7 @@
1101
1104
  };
1102
1105
  }
1103
1106
  get hasSelfTest() {
1104
- return false;
1107
+ return true;
1105
1108
  }
1106
1109
  get isIntermediate() {
1107
1110
  return false;
@@ -1137,27 +1140,34 @@
1137
1140
  );
1138
1141
  }
1139
1142
  async optOut() {
1143
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST")) {
1144
+ return true;
1145
+ }
1146
+ let timeout = 3e3;
1147
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1148
+ timeout = 1500;
1149
+ }
1140
1150
  await waitFor(() => document.readyState === "complete", 20, 100);
1141
- await this.waitForElement(".mainContent[aria-hidden=false]", 5e3);
1151
+ await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1142
1152
  if (this.click(".rejectAll")) {
1143
1153
  return true;
1144
1154
  }
1145
1155
  if (this.elementExists(".prefPanel")) {
1146
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', 3e3);
1156
+ await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1147
1157
  }
1148
1158
  if (this.click("#catDetails0")) {
1149
1159
  this.click(".submit");
1150
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1160
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1151
1161
  return true;
1152
1162
  }
1153
1163
  if (this.click(".required")) {
1154
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1164
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1155
1165
  return true;
1156
1166
  }
1157
1167
  await this.navigateToSettings();
1158
1168
  this.click(".switch span:nth-child(1):not(.active)", true);
1159
1169
  this.click(".submit");
1160
- this.waitForThenClick("#gwt-debug-close_id", 3e5);
1170
+ this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1161
1171
  return true;
1162
1172
  }
1163
1173
  async optIn() {
@@ -1172,6 +1182,10 @@
1172
1182
  });
1173
1183
  return true;
1174
1184
  }
1185
+ async test() {
1186
+ await this.wait(500);
1187
+ return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1188
+ }
1175
1189
  };
1176
1190
 
1177
1191
  // lib/cmps/cookiebot.ts
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 2,
3
3
  "name": "Autoconsent",
4
- "version": "2024.4.26",
4
+ "version": "2024.5.2",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"
@@ -3376,7 +3376,7 @@
3376
3376
  "urlPattern": "^https://www\\.instagram\\.com/"
3377
3377
  },
3378
3378
  "prehideSelectors": [
3379
- ".x78zum5.xdt5ytf.xg6iff7.x1n2onr6"
3379
+ ".x78zum5.xdt5ytf.xg6iff7.x1n2onr6:has(._a9--)"
3380
3380
  ],
3381
3381
  "detectCmp": [
3382
3382
  {
@@ -46,6 +46,8 @@
46
46
  },
47
47
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
48
48
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
49
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
50
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
49
51
  // declarative rules
50
52
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
51
53
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -493,6 +493,8 @@
493
493
  },
494
494
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
495
495
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
496
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
497
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
496
498
  // declarative rules
497
499
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
498
500
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -1038,7 +1040,7 @@
1038
1040
  this._optInDone = false;
1039
1041
  }
1040
1042
  get hasSelfTest() {
1041
- return false;
1043
+ return true;
1042
1044
  }
1043
1045
  get isIntermediate() {
1044
1046
  if (this._optInDone) {
@@ -1085,6 +1087,7 @@
1085
1087
  return true;
1086
1088
  }
1087
1089
  async test() {
1090
+ await this.wait(500);
1088
1091
  return await this.mainWorldEval("EVAL_TRUSTARC_TOP");
1089
1092
  }
1090
1093
  };
@@ -1101,7 +1104,7 @@
1101
1104
  };
1102
1105
  }
1103
1106
  get hasSelfTest() {
1104
- return false;
1107
+ return true;
1105
1108
  }
1106
1109
  get isIntermediate() {
1107
1110
  return false;
@@ -1137,27 +1140,34 @@
1137
1140
  );
1138
1141
  }
1139
1142
  async optOut() {
1143
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST")) {
1144
+ return true;
1145
+ }
1146
+ let timeout = 3e3;
1147
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1148
+ timeout = 1500;
1149
+ }
1140
1150
  await waitFor(() => document.readyState === "complete", 20, 100);
1141
- await this.waitForElement(".mainContent[aria-hidden=false]", 5e3);
1151
+ await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1142
1152
  if (this.click(".rejectAll")) {
1143
1153
  return true;
1144
1154
  }
1145
1155
  if (this.elementExists(".prefPanel")) {
1146
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', 3e3);
1156
+ await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1147
1157
  }
1148
1158
  if (this.click("#catDetails0")) {
1149
1159
  this.click(".submit");
1150
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1160
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1151
1161
  return true;
1152
1162
  }
1153
1163
  if (this.click(".required")) {
1154
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1164
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1155
1165
  return true;
1156
1166
  }
1157
1167
  await this.navigateToSettings();
1158
1168
  this.click(".switch span:nth-child(1):not(.active)", true);
1159
1169
  this.click(".submit");
1160
- this.waitForThenClick("#gwt-debug-close_id", 3e5);
1170
+ this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1161
1171
  return true;
1162
1172
  }
1163
1173
  async optIn() {
@@ -1172,6 +1182,10 @@
1172
1182
  });
1173
1183
  return true;
1174
1184
  }
1185
+ async test() {
1186
+ await this.wait(500);
1187
+ return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1188
+ }
1175
1189
  };
1176
1190
 
1177
1191
  // lib/cmps/cookiebot.ts
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2024.4.26",
4
+ "version": "2024.5.2",
5
5
  "background": {
6
6
  "service_worker": "background.bundle.js"
7
7
  },
@@ -3376,7 +3376,7 @@
3376
3376
  "urlPattern": "^https://www\\.instagram\\.com/"
3377
3377
  },
3378
3378
  "prehideSelectors": [
3379
- ".x78zum5.xdt5ytf.xg6iff7.x1n2onr6"
3379
+ ".x78zum5.xdt5ytf.xg6iff7.x1n2onr6:has(._a9--)"
3380
3380
  ],
3381
3381
  "detectCmp": [
3382
3382
  {
@@ -516,6 +516,8 @@ var snippets = {
516
516
  },
517
517
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
518
518
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
519
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
520
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
519
521
  // declarative rules
520
522
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
521
523
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -1061,7 +1063,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1061
1063
  this._optInDone = false;
1062
1064
  }
1063
1065
  get hasSelfTest() {
1064
- return false;
1066
+ return true;
1065
1067
  }
1066
1068
  get isIntermediate() {
1067
1069
  if (this._optInDone) {
@@ -1108,6 +1110,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1108
1110
  return true;
1109
1111
  }
1110
1112
  async test() {
1113
+ await this.wait(500);
1111
1114
  return await this.mainWorldEval("EVAL_TRUSTARC_TOP");
1112
1115
  }
1113
1116
  };
@@ -1124,7 +1127,7 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1124
1127
  };
1125
1128
  }
1126
1129
  get hasSelfTest() {
1127
- return false;
1130
+ return true;
1128
1131
  }
1129
1132
  get isIntermediate() {
1130
1133
  return false;
@@ -1160,27 +1163,34 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1160
1163
  );
1161
1164
  }
1162
1165
  async optOut() {
1166
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST")) {
1167
+ return true;
1168
+ }
1169
+ let timeout = 3e3;
1170
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1171
+ timeout = 1500;
1172
+ }
1163
1173
  await waitFor(() => document.readyState === "complete", 20, 100);
1164
- await this.waitForElement(".mainContent[aria-hidden=false]", 5e3);
1174
+ await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1165
1175
  if (this.click(".rejectAll")) {
1166
1176
  return true;
1167
1177
  }
1168
1178
  if (this.elementExists(".prefPanel")) {
1169
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', 3e3);
1179
+ await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1170
1180
  }
1171
1181
  if (this.click("#catDetails0")) {
1172
1182
  this.click(".submit");
1173
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1183
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1174
1184
  return true;
1175
1185
  }
1176
1186
  if (this.click(".required")) {
1177
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1187
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1178
1188
  return true;
1179
1189
  }
1180
1190
  await this.navigateToSettings();
1181
1191
  this.click(".switch span:nth-child(1):not(.active)", true);
1182
1192
  this.click(".submit");
1183
- this.waitForThenClick("#gwt-debug-close_id", 3e5);
1193
+ this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1184
1194
  return true;
1185
1195
  }
1186
1196
  async optIn() {
@@ -1195,6 +1205,10 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1195
1205
  });
1196
1206
  return true;
1197
1207
  }
1208
+ async test() {
1209
+ await this.wait(500);
1210
+ return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1211
+ }
1198
1212
  };
1199
1213
 
1200
1214
  // lib/cmps/cookiebot.ts
@@ -491,6 +491,8 @@ var snippets = {
491
491
  },
492
492
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
493
493
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
494
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
495
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
494
496
  // declarative rules
495
497
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
496
498
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -1036,7 +1038,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1036
1038
  this._optInDone = false;
1037
1039
  }
1038
1040
  get hasSelfTest() {
1039
- return false;
1041
+ return true;
1040
1042
  }
1041
1043
  get isIntermediate() {
1042
1044
  if (this._optInDone) {
@@ -1083,6 +1085,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1083
1085
  return true;
1084
1086
  }
1085
1087
  async test() {
1088
+ await this.wait(500);
1086
1089
  return await this.mainWorldEval("EVAL_TRUSTARC_TOP");
1087
1090
  }
1088
1091
  };
@@ -1099,7 +1102,7 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1099
1102
  };
1100
1103
  }
1101
1104
  get hasSelfTest() {
1102
- return false;
1105
+ return true;
1103
1106
  }
1104
1107
  get isIntermediate() {
1105
1108
  return false;
@@ -1135,27 +1138,34 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1135
1138
  );
1136
1139
  }
1137
1140
  async optOut() {
1141
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST")) {
1142
+ return true;
1143
+ }
1144
+ let timeout = 3e3;
1145
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1146
+ timeout = 1500;
1147
+ }
1138
1148
  await waitFor(() => document.readyState === "complete", 20, 100);
1139
- await this.waitForElement(".mainContent[aria-hidden=false]", 5e3);
1149
+ await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1140
1150
  if (this.click(".rejectAll")) {
1141
1151
  return true;
1142
1152
  }
1143
1153
  if (this.elementExists(".prefPanel")) {
1144
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', 3e3);
1154
+ await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1145
1155
  }
1146
1156
  if (this.click("#catDetails0")) {
1147
1157
  this.click(".submit");
1148
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1158
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1149
1159
  return true;
1150
1160
  }
1151
1161
  if (this.click(".required")) {
1152
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1162
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1153
1163
  return true;
1154
1164
  }
1155
1165
  await this.navigateToSettings();
1156
1166
  this.click(".switch span:nth-child(1):not(.active)", true);
1157
1167
  this.click(".submit");
1158
- this.waitForThenClick("#gwt-debug-close_id", 3e5);
1168
+ this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1159
1169
  return true;
1160
1170
  }
1161
1171
  async optIn() {
@@ -1170,6 +1180,10 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1170
1180
  });
1171
1181
  return true;
1172
1182
  }
1183
+ async test() {
1184
+ await this.wait(500);
1185
+ return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1186
+ }
1173
1187
  };
1174
1188
 
1175
1189
  // lib/cmps/cookiebot.ts