()
| 936 | } |
| 937 | |
| 938 | async function exportSettingsBundle() { |
| 939 | const settings = await getPersistedSettings(); |
| 940 | const bundle = { |
| 941 | schemaVersion: SETTINGS_EXPORT_SCHEMA_VERSION, |
| 942 | exportedAt: new Date().toISOString(), |
| 943 | extensionVersion: chrome.runtime.getManifest().version, |
| 944 | settings, |
| 945 | }; |
| 946 | |
| 947 | return { |
| 948 | fileName: buildSettingsExportFilename(), |
| 949 | fileContent: JSON.stringify(bundle, null, 2), |
| 950 | }; |
| 951 | } |
| 952 | |
| 953 | async function importSettingsBundle(configBundle) { |
| 954 | const state = await ensureManualInteractionAllowed('\u5bfc\u5165\u914d\u7f6e'); |
no test coverage detected