Grammalecte  Diff

Differences From Artifact [a72eb5ad85]:

To Artifact [621914c742]:


589
590
591
592
593
594
595
596
597
598
599
600
601
602
603

    saveDictionary: function (sName, oJSON) {
        if (!sName) {
            console.log("Error: name of dictionary to save is empty.")
            return;
        }
        if (sName == "__personal__") {
            browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sDictionary: "personal", oDict: oJSON}, dInfo: {} });
            browser.storage.local.set({ "personal_dictionary": oJSON });
        }
        else {
            this.oDictionaries[sName] = oJSON;
            if (oJSON === null) {
                delete this.oDictionaries[sName];
            }







|







589
590
591
592
593
594
595
596
597
598
599
600
601
602
603

    saveDictionary: function (sName, oJSON) {
        if (!sName) {
            console.log("Error: name of dictionary to save is empty.")
            return;
        }
        if (sName == "__personal__") {
            browser.runtime.sendMessage({ sCommand: "setDictionary", oParam: {sDictionary: "personal", oDict: oJSON}, oInfo: {} });
            browser.storage.local.set({ "personal_dictionary": oJSON });
        }
        else {
            this.oDictionaries[sName] = oJSON;
            if (oJSON === null) {
                delete this.oDictionaries[sName];
            }