Skip to content

Commit aef4243

Browse files
Release build 7.13.0 [ci release]
1 parent a7fd705 commit aef4243

File tree

167 files changed

+91709
-18794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+91709
-18794
lines changed

CHANGELOG.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
- enable messageBridge on Android + tests (#1395)
1+
- Add brokerProtection to Android bundle (#1447)
2+
- ntp: activity widget (#1419)
3+
- ntp: implement burning of history items (#1456)
4+
- ntp: more SR feedback (#1449)
5+
- ntp: activity schema + burn animation (#1448)
6+
- Allow click actions to fail silently with an additional parameter (#1444)
7+
- ntp: customizer translations (#1439)
8+
- Support elements that only contain textContent, remove commas from the end of addresses (#1440)
9+
- Line-break element (#1433)

Sources/ContentScopeScripts/dist/contentScope.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@
520520
apple: ["webCompat", ...baseFeatures],
521521
"apple-isolated": ["duckPlayer", "brokerProtection", "performanceMetrics", "clickToLoad", "messageBridge"],
522522
android: [...baseFeatures, "webCompat", "breakageReporting", "duckPlayer", "messageBridge"],
523+
"android-broker-protection": ["brokerProtection"],
523524
"android-autofill-password-import": ["autofillPasswordImport"],
524525
windows: ["cookie", ...baseFeatures, "windowsPermissionUsage", "duckPlayer", "brokerProtection", "breakageReporting"],
525526
firefox: ["cookie", ...baseFeatures, "clickToLoad"],

Sources/ContentScopeScripts/dist/contentScopeIsolated.js

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@
503503
apple: ['webCompat', ...baseFeatures],
504504
'apple-isolated': ['duckPlayer', 'brokerProtection', 'performanceMetrics', 'clickToLoad', 'messageBridge'],
505505
android: [...baseFeatures, 'webCompat', 'breakageReporting', 'duckPlayer', 'messageBridge'],
506+
'android-broker-protection': ['brokerProtection'],
506507
'android-autofill-password-import': ['autofillPasswordImport'],
507508
windows: ['cookie', ...baseFeatures, 'windowsPermissionUsage', 'duckPlayer', 'brokerProtection', 'breakageReporting'],
508509
firefox: ['cookie', ...baseFeatures, 'clickToLoad'],
@@ -10486,6 +10487,9 @@
1048610487
// Strip out the zip code since we're only interested in city/state here.
1048710488
item = item.replace(/,?\s*\d{5}(-\d{4})?/, '');
1048810489

10490+
// Replace any commas at the end of the string that could confuse the city/state split.
10491+
item = item.replace(/,$/, '');
10492+
1048910493
if (item.includes(',')) {
1049010494
words = item.split(',').map((item) => item.trim());
1049110495
} else {
@@ -10770,15 +10774,26 @@
1077010774
}
1077110775

1077210776
/**
10773-
* @param {{innerText: string}[]} elements
10777+
* @param {({ textContent: string } | { innerText: string })[]} elements
1077410778
* @param {string} key
1077510779
* @param {ExtractProfileProperty} extractField
1077610780
* @return {string[]}
1077710781
*/
1077810782
function stringValuesFromElements(elements, key, extractField) {
1077910783
return elements.map((element) => {
10780-
// todo: should we use textContent here?
10781-
let elementValue = rules[key]?.(element) ?? element?.innerText ?? null;
10784+
let elementValue;
10785+
10786+
if ('innerText' in element) {
10787+
elementValue = rules[key]?.(element) ?? element?.innerText ?? null;
10788+
10789+
// In instances where we use the text() node test, innerText will be undefined, and we fall back to textContent
10790+
} else if ('textContent' in element) {
10791+
elementValue = rules[key]?.(element) ?? element?.textContent ?? null;
10792+
}
10793+
10794+
if (!elementValue) {
10795+
return elementValue;
10796+
}
1078210797

1078310798
if (extractField?.afterText) {
1078410799
elementValue = elementValue?.split(extractField.afterText)[1]?.trim() || elementValue;
@@ -11519,6 +11534,10 @@
1151911534
const elements = getElements(rootElement, element.selector);
1152011535

1152111536
if (!elements?.length) {
11537+
if (element.failSilently) {
11538+
return new SuccessResponse({ actionID: action.id, actionType: action.actionType, response: null });
11539+
}
11540+
1152211541
return new ErrorResponse({
1152311542
actionID: action.id,
1152411543
message: `could not find element to click with selector '${element.selector}'!`,
@@ -11531,7 +11550,7 @@
1153111550
const elem = elements[i];
1153211551

1153311552
if ('disabled' in elem) {
11534-
if (elem.disabled) {
11553+
if (elem.disabled && !element.failSilently) {
1153511554
return new ErrorResponse({ actionID: action.id, message: `could not click disabled element ${element.selector}'!` });
1153611555
}
1153711556
}

Sources/ContentScopeScripts/dist/pages/duckplayer/dist/index.js

Lines changed: 188 additions & 186 deletions
Large diffs are not rendered by default.

Sources/ContentScopeScripts/dist/pages/duckplayer/index.html

Lines changed: 188 additions & 186 deletions
Large diffs are not rendered by default.

Sources/ContentScopeScripts/dist/pages/history/dist/index.js

Lines changed: 334 additions & 289 deletions
Large diffs are not rendered by default.

Sources/ContentScopeScripts/dist/pages/new-tab/burn.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)