Skip to content

Commit 258b5d3

Browse files
dbajpeyigithub-actions[bot]
authored andcommitted
Release build 11.31.0 [ci release]
1 parent 82d6731 commit 258b5d3

31 files changed

+10691
-4816
lines changed

CHANGELOG.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- Add viewport width fix for legacy bundle (#1981)
1+
- [Google Takeout Automation] Bookmark import on Android (#1935)

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ injected/src/element-hiding.js @duckduckgo/content-scope-scripts-owners @jonatha
1010
injected/src/features/click-to-load.js @duckduckgo/content-scope-scripts-owners @kzar @ladamski @franfaccin @jonathanKingston @shakyShane
1111
injected/src/features/click-to-load/ @duckduckgo/content-scope-scripts-owners @kzar @ladamski @franfaccin @jonathanKingston @shakyShane
1212
injected/src/locales/click-to-load/ @duckduckgo/content-scope-scripts-owners @kzar @ladamski @franfaccin @jonathanKingston @shakyShane
13-
injected/src/features/autofill-password-import.js @duckduckgo/content-scope-scripts-owners @dbajpeyi
13+
injected/src/features/autofill-import.js @duckduckgo/content-scope-scripts-owners @dbajpeyi
1414

1515
# Broker protection
1616
injected/src/features/broker-protection.js @duckduckgo/content-scope-scripts-owners @duckduckgo/injected-broker-protection

build/android/adsjsContentScope.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526
"brokerProtection",
527527
"performanceMetrics",
528528
"breakageReporting",
529-
"autofillPasswordImport",
529+
"autofillImport",
530530
"favicon",
531531
"webTelemetry",
532532
"pageContext"
@@ -545,7 +545,7 @@
545545
],
546546
android: [...baseFeatures, "webCompat", "breakageReporting", "duckPlayer", "messageBridge"],
547547
"android-broker-protection": ["brokerProtection"],
548-
"android-autofill-password-import": ["autofillPasswordImport"],
548+
"android-autofill-import": ["autofillImport"],
549549
"android-adsjs": [
550550
"apiManipulation",
551551
"webCompat",

build/android/autofillImport.js

Lines changed: 9751 additions & 0 deletions
Large diffs are not rendered by default.

build/android/autofillPasswordImport.js

Lines changed: 0 additions & 4459 deletions
This file was deleted.

build/android/brokerProtection.js

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@
20332033
"brokerProtection",
20342034
"performanceMetrics",
20352035
"breakageReporting",
2036-
"autofillPasswordImport",
2036+
"autofillImport",
20372037
"favicon",
20382038
"webTelemetry",
20392039
"pageContext"
@@ -2052,7 +2052,7 @@
20522052
],
20532053
android: [...baseFeatures, "webCompat", "breakageReporting", "duckPlayer", "messageBridge"],
20542054
"android-broker-protection": ["brokerProtection"],
2055-
"android-autofill-password-import": ["autofillPasswordImport"],
2055+
"android-autofill-import": ["autofillImport"],
20562056
"android-adsjs": [
20572057
"apiManipulation",
20582058
"webCompat",
@@ -8793,6 +8793,15 @@
87938793
return new SuccessResponse({ actionID: action.id, actionType: action.actionType, response: { actions: [] } });
87948794
}
87958795

8796+
// src/features/broker-protection/actions/scroll.js
8797+
init_define_import_meta_trackerLookup();
8798+
function scroll(action, root = document) {
8799+
const element = getElement(root, action.selector);
8800+
if (!element) return new ErrorResponse({ actionID: action.id, message: "missing element" });
8801+
element.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
8802+
return new SuccessResponse({ actionID: action.id, actionType: action.actionType, response: null });
8803+
}
8804+
87968805
// src/features/broker-protection/execute.js
87978806
async function execute(action, inputData, root = document) {
87988807
try {
@@ -8813,6 +8822,8 @@
88138822
return solveCaptcha2(action, data(action, inputData, "token"), root);
88148823
case "condition":
88158824
return condition(action, root);
8825+
case "scroll":
8826+
return scroll(action, root);
88168827
default: {
88178828
return new ErrorResponse({
88188829
actionID: action.id,
@@ -8860,36 +8871,36 @@
88608871
}
88618872

88628873
// src/features/broker-protection.js
8863-
var BrokerProtection = class extends ContentFeature {
8864-
init() {
8865-
this.messaging.subscribe("onActionReceived", async (params) => {
8866-
try {
8867-
const action = params.state.action;
8868-
const data2 = params.state.data;
8869-
if (!action) {
8870-
return this.messaging.notify("actionError", { error: "No action found." });
8871-
}
8872-
const { results, exceptions } = await this.exec(action, data2);
8873-
if (results) {
8874-
const parent = results[0];
8875-
const errors = results.filter((x2) => "error" in x2);
8876-
if (results.length === 1 || errors.length === 0) {
8877-
return this.messaging.notify("actionCompleted", { result: parent });
8878-
}
8879-
const joinedErrors = errors.map((x2) => x2.error.message).join(", ");
8880-
const response = new ErrorResponse({
8881-
actionID: action.id,
8882-
message: "Secondary actions failed: " + joinedErrors
8883-
});
8884-
return this.messaging.notify("actionCompleted", { result: response });
8885-
} else {
8886-
return this.messaging.notify("actionError", { error: "No response found, exceptions: " + exceptions.join(", ") });
8874+
var ActionExecutorBase = class extends ContentFeature {
8875+
/**
8876+
* @param {any} action
8877+
* @param {Record<string, any>} data
8878+
*/
8879+
async processActionAndNotify(action, data2) {
8880+
try {
8881+
if (!action) {
8882+
return this.messaging.notify("actionError", { error: "No action found." });
8883+
}
8884+
const { results, exceptions } = await this.exec(action, data2);
8885+
if (results) {
8886+
const parent = results[0];
8887+
const errors = results.filter((x2) => "error" in x2);
8888+
if (results.length === 1 || errors.length === 0) {
8889+
return this.messaging.notify("actionCompleted", { result: parent });
88878890
}
8888-
} catch (e) {
8889-
console.log("unhandled exception: ", e);
8890-
this.messaging.notify("actionError", { error: e.toString() });
8891+
const joinedErrors = errors.map((x2) => x2.error.message).join(", ");
8892+
const response = new ErrorResponse({
8893+
actionID: action.id,
8894+
message: "Secondary actions failed: " + joinedErrors
8895+
});
8896+
return this.messaging.notify("actionCompleted", { result: response });
8897+
} else {
8898+
return this.messaging.notify("actionError", { error: "No response found, exceptions: " + exceptions.join(", ") });
88918899
}
8892-
});
8900+
} catch (e) {
8901+
console.log("unhandled exception: ", e);
8902+
return this.messaging.notify("actionError", { error: e.toString() });
8903+
}
88938904
}
88948905
/**
88958906
* Recursively execute actions with the same dataset, collecting all results/exceptions for
@@ -8916,6 +8927,20 @@
89168927
}
89178928
return { results: [], exceptions };
89188929
}
8930+
/**
8931+
* @returns {any}
8932+
*/
8933+
retryConfigFor(action) {
8934+
this.log.error("unimplemented method: retryConfigFor:", action);
8935+
}
8936+
};
8937+
var BrokerProtection = class extends ActionExecutorBase {
8938+
init() {
8939+
this.messaging.subscribe("onActionReceived", async (params) => {
8940+
const { action, data: data2 } = params.state;
8941+
return await this.processActionAndNotify(action, data2);
8942+
});
8943+
}
89198944
/**
89208945
* Define default retry configurations for certain actions
89218946
*

build/android/contentScope.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@
13621362
"brokerProtection",
13631363
"performanceMetrics",
13641364
"breakageReporting",
1365-
"autofillPasswordImport",
1365+
"autofillImport",
13661366
"favicon",
13671367
"webTelemetry",
13681368
"pageContext"
@@ -1381,7 +1381,7 @@
13811381
],
13821382
android: [...baseFeatures, "webCompat", "breakageReporting", "duckPlayer", "messageBridge"],
13831383
"android-broker-protection": ["brokerProtection"],
1384-
"android-autofill-password-import": ["autofillPasswordImport"],
1384+
"android-autofill-import": ["autofillImport"],
13851385
"android-adsjs": [
13861386
"apiManipulation",
13871387
"webCompat",

build/apple/contentScope.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@
13781378
"brokerProtection",
13791379
"performanceMetrics",
13801380
"breakageReporting",
1381-
"autofillPasswordImport",
1381+
"autofillImport",
13821382
"favicon",
13831383
"webTelemetry",
13841384
"pageContext"
@@ -1397,7 +1397,7 @@
13971397
],
13981398
android: [...baseFeatures, "webCompat", "breakageReporting", "duckPlayer", "messageBridge"],
13991399
"android-broker-protection": ["brokerProtection"],
1400-
"android-autofill-password-import": ["autofillPasswordImport"],
1400+
"android-autofill-import": ["autofillImport"],
14011401
"android-adsjs": [
14021402
"apiManipulation",
14031403
"webCompat",

build/apple/contentScopeIsolated.js

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@
20672067
"brokerProtection",
20682068
"performanceMetrics",
20692069
"breakageReporting",
2070-
"autofillPasswordImport",
2070+
"autofillImport",
20712071
"favicon",
20722072
"webTelemetry",
20732073
"pageContext"
@@ -2086,7 +2086,7 @@
20862086
],
20872087
android: [...baseFeatures, "webCompat", "breakageReporting", "duckPlayer", "messageBridge"],
20882088
"android-broker-protection": ["brokerProtection"],
2089-
"android-autofill-password-import": ["autofillPasswordImport"],
2089+
"android-autofill-import": ["autofillImport"],
20902090
"android-adsjs": [
20912091
"apiManipulation",
20922092
"webCompat",
@@ -12072,6 +12072,15 @@ ul.messages {
1207212072
return new SuccessResponse({ actionID: action.id, actionType: action.actionType, response: { actions: [] } });
1207312073
}
1207412074

12075+
// src/features/broker-protection/actions/scroll.js
12076+
init_define_import_meta_trackerLookup();
12077+
function scroll(action, root = document) {
12078+
const element = getElement(root, action.selector);
12079+
if (!element) return new ErrorResponse({ actionID: action.id, message: "missing element" });
12080+
element.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
12081+
return new SuccessResponse({ actionID: action.id, actionType: action.actionType, response: null });
12082+
}
12083+
1207512084
// src/features/broker-protection/execute.js
1207612085
async function execute(action, inputData, root = document) {
1207712086
try {
@@ -12092,6 +12101,8 @@ ul.messages {
1209212101
return solveCaptcha2(action, data(action, inputData, "token"), root);
1209312102
case "condition":
1209412103
return condition(action, root);
12104+
case "scroll":
12105+
return scroll(action, root);
1209512106
default: {
1209612107
return new ErrorResponse({
1209712108
actionID: action.id,
@@ -12139,36 +12150,36 @@ ul.messages {
1213912150
}
1214012151

1214112152
// src/features/broker-protection.js
12142-
var BrokerProtection = class extends ContentFeature {
12143-
init() {
12144-
this.messaging.subscribe("onActionReceived", async (params) => {
12145-
try {
12146-
const action = params.state.action;
12147-
const data2 = params.state.data;
12148-
if (!action) {
12149-
return this.messaging.notify("actionError", { error: "No action found." });
12150-
}
12151-
const { results, exceptions } = await this.exec(action, data2);
12152-
if (results) {
12153-
const parent = results[0];
12154-
const errors = results.filter((x2) => "error" in x2);
12155-
if (results.length === 1 || errors.length === 0) {
12156-
return this.messaging.notify("actionCompleted", { result: parent });
12157-
}
12158-
const joinedErrors = errors.map((x2) => x2.error.message).join(", ");
12159-
const response = new ErrorResponse({
12160-
actionID: action.id,
12161-
message: "Secondary actions failed: " + joinedErrors
12162-
});
12163-
return this.messaging.notify("actionCompleted", { result: response });
12164-
} else {
12165-
return this.messaging.notify("actionError", { error: "No response found, exceptions: " + exceptions.join(", ") });
12153+
var ActionExecutorBase = class extends ContentFeature {
12154+
/**
12155+
* @param {any} action
12156+
* @param {Record<string, any>} data
12157+
*/
12158+
async processActionAndNotify(action, data2) {
12159+
try {
12160+
if (!action) {
12161+
return this.messaging.notify("actionError", { error: "No action found." });
12162+
}
12163+
const { results, exceptions } = await this.exec(action, data2);
12164+
if (results) {
12165+
const parent = results[0];
12166+
const errors = results.filter((x2) => "error" in x2);
12167+
if (results.length === 1 || errors.length === 0) {
12168+
return this.messaging.notify("actionCompleted", { result: parent });
1216612169
}
12167-
} catch (e) {
12168-
console.log("unhandled exception: ", e);
12169-
this.messaging.notify("actionError", { error: e.toString() });
12170+
const joinedErrors = errors.map((x2) => x2.error.message).join(", ");
12171+
const response = new ErrorResponse({
12172+
actionID: action.id,
12173+
message: "Secondary actions failed: " + joinedErrors
12174+
});
12175+
return this.messaging.notify("actionCompleted", { result: response });
12176+
} else {
12177+
return this.messaging.notify("actionError", { error: "No response found, exceptions: " + exceptions.join(", ") });
1217012178
}
12171-
});
12179+
} catch (e) {
12180+
console.log("unhandled exception: ", e);
12181+
return this.messaging.notify("actionError", { error: e.toString() });
12182+
}
1217212183
}
1217312184
/**
1217412185
* Recursively execute actions with the same dataset, collecting all results/exceptions for
@@ -12195,6 +12206,20 @@ ul.messages {
1219512206
}
1219612207
return { results: [], exceptions };
1219712208
}
12209+
/**
12210+
* @returns {any}
12211+
*/
12212+
retryConfigFor(action) {
12213+
this.log.error("unimplemented method: retryConfigFor:", action);
12214+
}
12215+
};
12216+
var BrokerProtection = class extends ActionExecutorBase {
12217+
init() {
12218+
this.messaging.subscribe("onActionReceived", async (params) => {
12219+
const { action, data: data2 } = params.state;
12220+
return await this.processActionAndNotify(action, data2);
12221+
});
12222+
}
1219812223
/**
1219912224
* Define default retry configurations for certain actions
1220012225
*

build/chrome-mv3/inject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@
13071307
"brokerProtection",
13081308
"performanceMetrics",
13091309
"breakageReporting",
1310-
"autofillPasswordImport",
1310+
"autofillImport",
13111311
"favicon",
13121312
"webTelemetry",
13131313
"pageContext"
@@ -1326,7 +1326,7 @@
13261326
],
13271327
android: [...baseFeatures, "webCompat", "breakageReporting", "duckPlayer", "messageBridge"],
13281328
"android-broker-protection": ["brokerProtection"],
1329-
"android-autofill-password-import": ["autofillPasswordImport"],
1329+
"android-autofill-import": ["autofillImport"],
13301330
"android-adsjs": [
13311331
"apiManipulation",
13321332
"webCompat",

0 commit comments

Comments
 (0)