Index: gc_lang/fr/build.py ================================================================== --- gc_lang/fr/build.py +++ gc_lang/fr/build.py @@ -31,11 +31,11 @@ sLang = dVars['sDefaultUILang'] for sSection, lOpt in dVars['lStructOpt']: sHTML += f'\n
\n

{dVars["dOptLabel"][sLang][sSection][0]}

\n' for lLineOpt in lOpt: for sOpt in lLineOpt: - sHTML += f'

\n' + sHTML += f'

\n' sHTML += '
\n' return sHTML def createFirefoxExtension (sLang, dVars): Index: gc_lang/fr/webext/panel/main.js ================================================================== --- gc_lang/fr/webext/panel/main.js +++ gc_lang/fr/webext/panel/main.js @@ -149,12 +149,21 @@ setGCOptions(dSavedOptions.gc_options); } } function setGCOptions (dOptions) { + console.log(typeof(dOptions)); console.log(dOptions); - for (let [sOpt, bVal] of dOptions) { + /*for (let [sOpt, bVal] of dOptions) { 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); + } } }