@duckduckgo/autoconsent 16.2.0 → 16.4.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.
Files changed (40) hide show
  1. package/.agents/skills/proxy-testing/scripts/regional-proxy.mjs +4 -1
  2. package/.github/PULL_REQUEST_TEMPLATE.md +2 -2
  3. package/.github/dependabot.yml +1 -1
  4. package/.github/labeler.yml +6 -6
  5. package/CHANGELOG.md +41 -0
  6. package/dist/addon-firefox/compact-rules.json +1 -1
  7. package/dist/addon-firefox/devtools/panel.html +5 -0
  8. package/dist/addon-firefox/devtools/panel.ts +18 -1
  9. package/dist/addon-firefox/manifest.json +1 -1
  10. package/dist/addon-firefox/rule-index.json +1 -1
  11. package/dist/addon-firefox/rules.json +1 -1
  12. package/dist/addon-mv3/compact-rules.json +1 -1
  13. package/dist/addon-mv3/devtools/panel.html +5 -0
  14. package/dist/addon-mv3/devtools/panel.js +12 -0
  15. package/dist/addon-mv3/devtools/panel.ts +18 -1
  16. package/dist/addon-mv3/manifest.json +1 -1
  17. package/dist/addon-mv3/rule-index.json +1 -1
  18. package/dist/addon-mv3/rules.json +1 -1
  19. package/dist/autoconsent.standalone.js +2 -2
  20. package/docs/puppeteer.md +1 -1
  21. package/docs/release-notes.md +12 -43
  22. package/package.json +15 -15
  23. package/rules/autoconsent/ketch.json +58 -19
  24. package/rules/autoconsent/msn.json +18 -0
  25. package/rules/compact-rules.json +1 -1
  26. package/rules/rule-index.json +1 -1
  27. package/rules/rules.json +1 -1
  28. package/scripts/check-pr-release-labels.ts +24 -24
  29. package/standalone/content.ts +1 -1
  30. package/tests/ketch.spec.ts +33 -19
  31. package/tests/msn.spec.ts +5 -0
  32. package/tests-wtr/lifecycle/find-cmp.ts +2 -2
  33. package/tests-wtr/web/do-opt-in.test.ts +1 -1
  34. package/tests-wtr/web/do-opt-out.test.ts +1 -1
  35. package/tests-wtr/web/do-self-test.test.ts +1 -1
  36. package/tests-wtr/web/filter-cmps.test.ts +1 -1
  37. package/tests-wtr/web/receive-message-callback.test.ts +1 -1
  38. package/tests-wtr/web/update-state.test.ts +1 -1
  39. package/rules/autoconsent/theverge.json +0 -36
  40. package/tests/theverge.spec.ts +0 -3
@@ -31,6 +31,9 @@
31
31
  <div class="level-item">
32
32
  <button class="button" id="reload">Reload</button>
33
33
  </div>
34
+ <div class="level-item">
35
+ <button class="button" id="measure-performance">Measure Performance</button>
36
+ </div>
34
37
  <div class="level-item">
35
38
  <label class="checkbox">
36
39
  <input type="checkbox" id="clear-storage" />
@@ -65,6 +68,7 @@
65
68
  <th>Detection attempts</th>
66
69
  <th>CMP Detected</th>
67
70
  <th>Popup open</th>
71
+ <th>Performance</th>
68
72
  </tr>
69
73
  </thead>
70
74
  <tbody></tbody>
@@ -78,6 +82,7 @@
78
82
  <td></td>
79
83
  <td></td>
80
84
  <td></td>
85
+ <td></td>
81
86
  </tr>
82
87
  </template>
83
88
  <script src="./panel.js"></script>
@@ -32,6 +32,12 @@
32
32
  return td;
33
33
  }
34
34
  }
35
+ function formatPerformance(performance) {
36
+ if (!performance) {
37
+ return "";
38
+ }
39
+ return Object.entries(performance).filter(([, values]) => values.length > 0).map(([name, values]) => `${name}: ${values.map((value) => `${value}ms`).join(", ")}`).join("\n");
40
+ }
35
41
  function reconnect() {
36
42
  backgroundPageConnection = chrome.runtime.connect({
37
43
  name: "devtools-panel"
@@ -50,6 +56,7 @@
50
56
  td[4].innerText = `${message.state.findCmpAttempts}`;
51
57
  td[5].innerText = message.state.detectedCmps.join(", ");
52
58
  td[6].innerText = message.state.detectedPopups.join(", ");
59
+ td[7].innerText = formatPerformance(message.state.performance);
53
60
  } else if (message.type === "instanceTerminated") {
54
61
  document.getElementById(`instance-${message.instanceId}`)?.classList.add("dead");
55
62
  }
@@ -85,6 +92,11 @@
85
92
  clearPanel();
86
93
  chrome.devtools.inspectedWindow.reload({});
87
94
  });
95
+ document.getElementById("measure-performance").addEventListener("click", () => {
96
+ chrome.tabs.sendMessage(chrome.devtools.inspectedWindow.tabId, {
97
+ type: "measurePerformance"
98
+ });
99
+ });
88
100
  document.getElementById("mode").addEventListener("change", async () => {
89
101
  const storedConfig = await storageGet("config");
90
102
  let autoAction = document.querySelector("#mode > option:checked").getAttribute("data-autoaction");
@@ -1,4 +1,4 @@
1
- import { BackgroundDevtoolsMessage, DevtoolsMessage } from '../../lib/messages';
1
+ import { BackgroundDevtoolsMessage, BackgroundMessage, DevtoolsMessage } from '../../lib/messages';
2
2
  import { Config } from '../../lib/types';
3
3
  import { storageGet, storageSet } from '../mv-compat';
4
4
 
@@ -25,6 +25,16 @@ function getRowForInstance(instanceId: string) {
25
25
  }
26
26
  }
27
27
 
28
+ function formatPerformance(performance?: Record<string, number[]>) {
29
+ if (!performance) {
30
+ return '';
31
+ }
32
+ return Object.entries(performance)
33
+ .filter(([, values]) => values.length > 0)
34
+ .map(([name, values]) => `${name}: ${values.map((value) => `${value}ms`).join(', ')}`)
35
+ .join('\n');
36
+ }
37
+
28
38
  function reconnect(): chrome.runtime.Port {
29
39
  backgroundPageConnection = chrome.runtime.connect({
30
40
  name: 'devtools-panel',
@@ -44,6 +54,7 @@ function reconnect(): chrome.runtime.Port {
44
54
  td[4].innerText = `${message.state.findCmpAttempts}`;
45
55
  td[5].innerText = message.state.detectedCmps.join(', ');
46
56
  td[6].innerText = message.state.detectedPopups.join(', ');
57
+ td[7].innerText = formatPerformance(message.state.performance);
47
58
  } else if (message.type === 'instanceTerminated') {
48
59
  document.getElementById(`instance-${message.instanceId}`)?.classList.add('dead');
49
60
  }
@@ -85,6 +96,12 @@ document.getElementById('reload').addEventListener('click', async () => {
85
96
  chrome.devtools.inspectedWindow.reload({});
86
97
  });
87
98
 
99
+ document.getElementById('measure-performance').addEventListener('click', () => {
100
+ chrome.tabs.sendMessage(chrome.devtools.inspectedWindow.tabId, {
101
+ type: 'measurePerformance',
102
+ } as BackgroundMessage);
103
+ });
104
+
88
105
  document.getElementById('mode').addEventListener('change', async () => {
89
106
  const storedConfig = await storageGet('config');
90
107
  let autoAction = document.querySelector('#mode > option:checked').getAttribute('data-autoaction');
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2026.6.26",
4
+ "version": "2026.7.1",
5
5
  "background": {
6
6
  "service_worker": "background.bundle.js"
7
7
  },