summaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index d2fb0e49..8f86e47a 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -66,31 +66,6 @@ function utilBackend() {
return backend;
}
-async function utilDatabaseDeleteDictionary(dictionaryName, onProgress) {
- return utilIsolate(await utilBackend().translator.database.deleteDictionary(
- utilBackgroundIsolate(dictionaryName),
- utilBackgroundFunctionIsolate(onProgress)
- ));
-}
-
-async function utilDatabaseImport(data, onProgress, details) {
- data = await utilReadFile(data);
- return utilIsolate(await utilBackend().importDictionary(
- utilBackgroundIsolate(data),
- utilBackgroundFunctionIsolate(onProgress),
- utilBackgroundIsolate(details)
- ));
-}
-
-function utilReadFile(file) {
- return new Promise((resolve, reject) => {
- const reader = new FileReader();
- reader.onload = () => resolve(reader.result);
- reader.onerror = () => reject(reader.error);
- reader.readAsBinaryString(file);
- });
-}
-
function utilReadFileArrayBuffer(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();