Overview
Comment: | [fx][bug] JS sucks: don’t store Map object in storage |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fx |
Files: | files | file ages | folders |
SHA3-256: |
4124e272180a7b81f0b73add05c045cc |
User & Date: | olr on 2018-03-07 15:23:55 |
Other Links: | manifest | tags |
Context
2018-03-07
| ||
16:01 | [fx] new version for WebExtension check-in: 23d108bf86 user: olr tags: trunk, fx | |
15:23 | [fx][bug] JS sucks: don’t store Map object in storage check-in: 4124e27218 user: olr tags: trunk, fx | |
13:57 | [fx] main panel: better functions name check-in: 07d0ec19f5 user: olr tags: trunk, fx | |
Changes
Modified gc_lang/fr/webext/background.js from [b1af0b858f] to [716a2f0752].
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - - - - - + + + - + - - - - | browser.runtime.sendMessage(e.data); break; case "getOptions": case "getDefaultOptions": case "resetOptions": // send result to panel storeGCOptions(result); |
︙ | |||
323 324 325 326 327 328 329 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + - | /* Actions */ function storeGCOptions (dOptions) { |
︙ |
Modified gc_lang/fr/webext/gce_worker.js from [0220235f9e] to [42760d524d].
︙ | |||
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | + + + + - + | gc_engine.load(sContext, sExtensionPath+"grammalecte/graphspell/_dictionaries"); oSpellChecker = gc_engine.getSpellChecker(); oTest = new TestGrammarChecking(gc_engine, sExtensionPath+"/grammalecte/fr/tests_data.json"); oTokenizer = new Tokenizer("fr"); oLocution = helpers.loadFile(sExtensionPath + "/grammalecte/fr/locutions_data.json"); oLxg = new Lexicographe(oSpellChecker, oTokenizer, oLocution); if (dOptions !== null) { if (!(dOptions instanceof Map)) { dOptions = helpers.objectToMap(dOptions); } gc_engine.setOptions(dOptions); } //tests(); bInitDone = true; } else { console.log("[Worker] Already initialized…") } // we always retrieve options from the gc_engine, for setOptions filters obsolete options dOptions = helpers.mapToObject(gc_engine.getOptions()); |
︙ | |||
213 214 215 216 217 218 219 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | + - + + - + + + + + - + + - + + - + | sParagraph = sParagraph.replace(//g, "").normalize("NFC"); let aGrammErr = gc_engine.parse(sParagraph, sCountry, bDebug, bContext); let aSpellErr = oSpellChecker.parseParagraph(sParagraph); postMessage(createResponse("parseAndSpellcheck1", {sParagraph: sParagraph, aGrammErr: aGrammErr, aSpellErr: aSpellErr}, dInfo, true)); } function getOptions (dInfo={}) { let dOptions = helpers.mapToObject(gc_engine.getOptions()); |
︙ |
Modified gc_lang/fr/webext/panel/main.js from [3a6b7ee35a] to [c3e1902233].
︙ | |||
207 208 209 210 211 212 213 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + - - - - - - - - + + + - + | function _displayGCOptions (dSavedOptions) { if (dSavedOptions.hasOwnProperty("gc_options")) { displayGCOptions(dSavedOptions.gc_options); } } |