Grammalecte  Diff

Differences From Artifact [0dd514b39a]:

To Artifact [515cc52320]:


147
148
149
150
151
152
153



154
155
156







157
158
159
160
161
162
163
164
165
166
167
168
169
147
148
149
150
151
152
153
154
155
156



157
158
159
160
161
162
163
164
165
166








167
168







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



-
-
-
-
-
-
-
-


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

function setGCOptions (dOptions) {
    if (bChrome) {
        // JS crap again. Chrome can’t store Map object.
        let m = new Map();
    console.log(typeof(dOptions));
    console.log(dOptions);
    /*for (let [sOpt, bVal] of dOptions) {
        for (let param in dOptions) {
            m.set(param, dOptions[param]);
        }
        dOptions = m;
    }
    for (let [sOpt, bVal] of dOptions) {
        console.log(sOpt + ": " + bVal);
        if (document.getElementById("option_"+sOpt)) {
            document.getElementById("option_"+sOpt).checked = bVal;
        }
    }*/
    // JS bullshit never ends. For some reason, it’s not a Map anymore on Chrome! 
    for (let xOption of document.getElementsByClassName("gc_option")) {
        console.log(xOption.id);
        let sOpt = xOption.id.slice(7);
        if (dOptions.has(sOpt)) {
            xOption.checked = dOptions.get(sOpt);
        }
    }
}