finish implementing json dictionary manager

This commit is contained in:
wareya committed 2019-05-13 23:53:47 -04:00
1 parent 2d80feeae9
commit 74165046e3
3 files changed
+277 -14

No files matched your search

+3 -2
View File
@@ -84,7 +84,7 @@ async function get_storage_or_default(name, fallback)
async function refresh_json()
{
let custom_dicts = (await get_storage_or_default("custom_dicts", []));
json_dicts = [];
let new_json_dicts = [];
for(let stored_dict of custom_dicts)
{
if(!stored_dict.enabled)
@@ -103,8 +103,9 @@ async function refresh_json()
add_json_spelling(dict, spelling, i);
}
} catch(e){}
json_dicts.push(dict);
new_json_dicts.push(dict);
}
json_dicts = new_json_dicts;
}
async function migrate_legacy_then_refresh()