Grammalecte  Diff

Differences From Artifact [5258bba8d8]:

To Artifact [82866d8fd8]:


43
44
45
46
47
48
49

50
51
52
53
54






55
56
57
58
59
60
61
43
44
45
46
47
48
49
50





51
52
53
54
55
56
57
58
59
60
61
62
63







+
-
-
-
-
-
+
+
+
+
+
+







                browser.runtime.sendMessage({
                   sCommand: "resetOptions",
                   dParam: {},
                   dInfo: {}
                });
            }
            else if (xElem.id.startsWith("option_")) {
                if (xElem.dataset.option) {
                browser.runtime.sendMessage({
                    sCommand: "setOption",
                    dParam: {sOptName: xElem.dataset.option, bValue: xElem.checked},
                    dInfo: {}
                });
                    browser.runtime.sendMessage({
                        sCommand: "setOption",
                        dParam: {sOptName: xElem.dataset.option, bValue: xElem.checked},
                        dInfo: {}
                    });
                }
            }
            else if (xElem.id.startsWith("ui_option_")) {
                storeUIOptions();
            }
            else if (xElem.id.startsWith("link_")) {
                browser.tabs.create({url: xElem.dataset.url});
            }
206
207
208
209
210
211
212

213
214
215



216
217
218
219
220
221
222
223
224
225
226
227













208
209
210
211
212
213
214
215



216
217
218












219
220
221
222
223
224
225
226
227
228
229
230
231







+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
function _setGCOptions (dSavedOptions) {
    if (dSavedOptions.hasOwnProperty("gc_options")) {
        setGCOptions(dSavedOptions.gc_options);
    }
}

function setGCOptions (dOptions) {
    try {
    // dOptions is supposed to be a Map
    if (bChrome) {
        // JS crap again. Chrome can’t store/send Map object.
        // dOptions is supposed to be a Map
        if (bChrome) {
            // JS crap again. Chrome can’t store/send Map object.
        let m = new Map();
        for (let param in dOptions) {
            m.set(param, dOptions[param]);
        }
        dOptions = m;
    }
    for (let [sOpt, bVal] of dOptions) {
        if (document.getElementById("option_"+sOpt)) {
            document.getElementById("option_"+sOpt).checked = bVal;
        }
    }
}
            dOptions = helpers.objectToMap(dOptions);
        }
        for (let [sOpt, bVal] of dOptions) {
            if (document.getElementById("option_"+sOpt)) {
                document.getElementById("option_"+sOpt).checked = bVal;
            }
        }
    }
    catch (e) {
        console.log(dOptions);
        showError(e);
    }
}