497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
|
let xProgressNode = document.getElementById("wait_progress");
let lEntry = oLexiconTable.getEntries();
if (lEntry.length > 0) {
let oDAWG = new DAWG(lEntry, "S", "fr", "Français", "Dictionnaire personnel", xProgressNode);
let oJSON = oDAWG.createBinaryJSON(1);
browser.storage.local.set({ "oPersonalDictionary": oJSON });
this.oIBDAWG = new IBDAWG(oJSON);
this.setDictData(this.oIBDAWG.nEntry, this.oIBDAWG.sDate);
browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: oJSON}, dInfo: {} });
}
showElement("export_button");
},
import: function () {
console.log("import");
},
export: function () {
|
|
<
|
>
>
>
>
>
|
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
|
let xProgressNode = document.getElementById("wait_progress");
let lEntry = oLexiconTable.getEntries();
if (lEntry.length > 0) {
let oDAWG = new DAWG(lEntry, "S", "fr", "Français", "Dictionnaire personnel", xProgressNode);
let oJSON = oDAWG.createBinaryJSON(1);
browser.storage.local.set({ "oPersonalDictionary": oJSON });
this.oIBDAWG = new IBDAWG(oJSON);
this.setDictData(this.oIBDAWG.nEntry, this.oIBDAWG.sDate);
browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: oJSON}, dInfo: {} });
showElement("export_button");
} else {
this.setDictData(0, "[néant]");
browser.storage.local.set({ "oPersonalDictionary": "" });
browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: null}, dInfo: {} });
}
},
import: function () {
console.log("import");
},
export: function () {
|