@duckduckgo/autoconsent 16.43.0 → 16.43.2
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.md +9 -1
- package/CHANGELOG.md +30 -0
- package/ci/asana-update-tasks.js +1 -1
- package/data/coverage.json +2005 -1512
- package/dist/addon-firefox/content.bundle.js +1 -1
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-mv3/content.bundle.js +1 -1
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/autoconsent.cjs.js +1 -1
- package/dist/autoconsent.esm.js +1 -1
- package/dist/autoconsent.playwright.js +1 -1
- package/dist/autoconsent.standalone.js +1 -1
- package/docs/rule-syntax.md +4 -4
- package/lib/dom-actions.ts +1 -1
- package/package.json +2 -3
- package/tsconfig.json +1 -0
|
@@ -2687,7 +2687,7 @@
|
|
|
2687
2687
|
if (selector.startsWith("xpath/")) {
|
|
2688
2688
|
const xpath = selector.slice(6);
|
|
2689
2689
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
2690
|
-
let node
|
|
2690
|
+
let node;
|
|
2691
2691
|
const elements = [];
|
|
2692
2692
|
while (node = result.iterateNext()) {
|
|
2693
2693
|
elements.push(node);
|
|
@@ -2687,7 +2687,7 @@
|
|
|
2687
2687
|
if (selector.startsWith("xpath/")) {
|
|
2688
2688
|
const xpath = selector.slice(6);
|
|
2689
2689
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
2690
|
-
let node
|
|
2690
|
+
let node;
|
|
2691
2691
|
const elements = [];
|
|
2692
2692
|
while (node = result.iterateNext()) {
|
|
2693
2693
|
elements.push(node);
|
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -2723,7 +2723,7 @@ var DomActions = class {
|
|
|
2723
2723
|
if (selector.startsWith("xpath/")) {
|
|
2724
2724
|
const xpath = selector.slice(6);
|
|
2725
2725
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
2726
|
-
let node
|
|
2726
|
+
let node;
|
|
2727
2727
|
const elements = [];
|
|
2728
2728
|
while (node = result.iterateNext()) {
|
|
2729
2729
|
elements.push(node);
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -2693,7 +2693,7 @@ var DomActions = class {
|
|
|
2693
2693
|
if (selector.startsWith("xpath/")) {
|
|
2694
2694
|
const xpath = selector.slice(6);
|
|
2695
2695
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
2696
|
-
let node
|
|
2696
|
+
let node;
|
|
2697
2697
|
const elements = [];
|
|
2698
2698
|
while (node = result.iterateNext()) {
|
|
2699
2699
|
elements.push(node);
|
|
@@ -2695,7 +2695,7 @@
|
|
|
2695
2695
|
if (selector.startsWith("xpath/")) {
|
|
2696
2696
|
const xpath = selector.slice(6);
|
|
2697
2697
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
2698
|
-
let node
|
|
2698
|
+
let node;
|
|
2699
2699
|
const elements = [];
|
|
2700
2700
|
while (node = result.iterateNext()) {
|
|
2701
2701
|
elements.push(node);
|
|
@@ -2695,7 +2695,7 @@
|
|
|
2695
2695
|
if (selector.startsWith("xpath/")) {
|
|
2696
2696
|
const xpath = selector.slice(6);
|
|
2697
2697
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
2698
|
-
let node
|
|
2698
|
+
let node;
|
|
2699
2699
|
const elements = [];
|
|
2700
2700
|
while (node = result.iterateNext()) {
|
|
2701
2701
|
elements.push(node);
|
package/docs/rule-syntax.md
CHANGED
|
@@ -66,7 +66,7 @@ Returns true if the given selector matches one or more elements.
|
|
|
66
66
|
"check": "any" | "all" | "none"
|
|
67
67
|
}
|
|
68
68
|
```
|
|
69
|
-
Returns true if elements matched by ElementSelector are currently visible on the page. If `check` is `all` (default), every element must be visible. If `check` is `none`, no element should be visible. Visibility check is a CSS-based heuristic.
|
|
69
|
+
Returns true if elements matched by ElementSelector are currently visible on the page. If `check` is `all` (default), every element must be visible. If `check` is `none`, no element should be visible. Visibility check is a CSS-based heuristic. Prehiding does not affect this check.
|
|
70
70
|
|
|
71
71
|
## Wait for element
|
|
72
72
|
|
|
@@ -87,7 +87,7 @@ Waits until `selector` exists in the page. After `timeout` ms the step fails.
|
|
|
87
87
|
"check": "any" | "all" | "none"
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
|
-
Waits until element is visible in the page. After `timeout` ms the step fails.
|
|
90
|
+
Waits until element is visible in the page. After `timeout` ms the step fails. To wait until an element is not visible, use `check: "none"`, not `negated`.
|
|
91
91
|
|
|
92
92
|
## Click an element
|
|
93
93
|
```javascript
|
|
@@ -183,7 +183,7 @@ The optional `stylesheetId` is a marker used to prevent duplicate inserts when t
|
|
|
183
183
|
"cookieContains": "substring"
|
|
184
184
|
}
|
|
185
185
|
```
|
|
186
|
-
Checks if the substring is present in the document.cookie string.
|
|
186
|
+
Checks if the substring is present in the document.cookie string. `HttpOnly` cookies are not in this string.
|
|
187
187
|
|
|
188
188
|
## Eval
|
|
189
189
|
|
|
@@ -234,7 +234,7 @@ Evaluates a list of steps in order. If any return true (success), then the step
|
|
|
234
234
|
}
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
-
If `negated` is true, the result will be inverted. For example, `{ "exists": ".my-class", "negated": true }` will return true if `.my-class` does not exist.
|
|
237
|
+
If `negated` is true, the result will be inverted. For example, `{ "exists": ".my-class", "negated": true }` will return true if `.my-class` does not exist. The result is inverted after the step is complete, so `negated` does not change what a waiting step waits for.
|
|
238
238
|
|
|
239
239
|
## Optional actions
|
|
240
240
|
|
package/lib/dom-actions.ts
CHANGED
|
@@ -178,7 +178,7 @@ export class DomActions implements DomActionsProvider {
|
|
|
178
178
|
if (selector.startsWith('xpath/')) {
|
|
179
179
|
const xpath = selector.slice(6);
|
|
180
180
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
181
|
-
let node: Node | null
|
|
181
|
+
let node: Node | null;
|
|
182
182
|
const elements: HTMLElement[] = [];
|
|
183
183
|
while ((node = result.iterateNext())) {
|
|
184
184
|
elements.push(node as HTMLElement);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckduckgo/autoconsent",
|
|
3
|
-
"version": "16.43.
|
|
3
|
+
"version": "16.43.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"types": "./dist/types/web.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -42,13 +42,12 @@
|
|
|
42
42
|
"author": "Sam Macbeth",
|
|
43
43
|
"license": "MPL-2.0",
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@duckduckgo/eslint-config": "github:duckduckgo/eslint-config#v0.
|
|
45
|
+
"@duckduckgo/eslint-config": "github:duckduckgo/eslint-config#v0.3.0",
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4-fix.0",
|
|
47
47
|
"@octokit/rest": "^22.0.1",
|
|
48
48
|
"@playwright/test": "^1.17.1",
|
|
49
49
|
"@types/chai": "^5.0.0",
|
|
50
50
|
"@types/chrome": "^0.1.0",
|
|
51
|
-
"@types/eslint": "^9.6.1",
|
|
52
51
|
"@types/mocha": "^10.0.1",
|
|
53
52
|
"@types/sinon": "^21.0.0",
|
|
54
53
|
"@web/dev-server-esbuild": "^1.0.2",
|