@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.
- package/.agents/skills/proxy-testing/scripts/regional-proxy.mjs +4 -1
- package/.github/PULL_REQUEST_TEMPLATE.md +2 -2
- package/.github/dependabot.yml +1 -1
- package/.github/labeler.yml +6 -6
- package/CHANGELOG.md +41 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/devtools/panel.html +5 -0
- package/dist/addon-firefox/devtools/panel.ts +18 -1
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/devtools/panel.html +5 -0
- package/dist/addon-mv3/devtools/panel.js +12 -0
- package/dist/addon-mv3/devtools/panel.ts +18 -1
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.standalone.js +2 -2
- package/docs/puppeteer.md +1 -1
- package/docs/release-notes.md +12 -43
- package/package.json +15 -15
- package/rules/autoconsent/ketch.json +58 -19
- package/rules/autoconsent/msn.json +18 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/check-pr-release-labels.ts +24 -24
- package/standalone/content.ts +1 -1
- package/tests/ketch.spec.ts +33 -19
- package/tests/msn.spec.ts +5 -0
- package/tests-wtr/lifecycle/find-cmp.ts +2 -2
- package/tests-wtr/web/do-opt-in.test.ts +1 -1
- package/tests-wtr/web/do-opt-out.test.ts +1 -1
- package/tests-wtr/web/do-self-test.test.ts +1 -1
- package/tests-wtr/web/filter-cmps.test.ts +1 -1
- package/tests-wtr/web/receive-message-callback.test.ts +1 -1
- package/tests-wtr/web/update-state.test.ts +1 -1
- package/rules/autoconsent/theverge.json +0 -36
- 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>
|
|
@@ -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');
|