Overview
Comment: | [core] move require helper at the top of conj.js (following the same logic everywhere) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | webext2_fix |
Files: | files | file ages | folders |
SHA3-256: |
eb74ef2889179d3eb982c1dae105cd9a |
User & Date: | IllusionPerdu on 2017-08-08 17:07:16 |
Original Comment: | [gc_lang] move require helper in top of file conjs.js to have the same logic in all files |
Other Links: | branch diff | manifest | tags |
Context
2017-08-08
| ||
17:31 | [core] add isInit in object conj, phonet, mfsp to prevent loading data twice check-in: 5dd4693a8f user: IllusionPerdu tags: core, webext2_fix | |
17:07 | [core] move require helper at the top of conj.js (following the same logic everywhere) check-in: eb74ef2889 user: IllusionPerdu tags: core, webext2_fix | |
16:49 | [core][fr] change typeof(exports) before the require block check-in: 6c8ee6edcf user: IllusionPerdu tags: core, webext2_fix | |
Changes
Modified gc_lang/fr/modules-js/conj.js from [abb72eabf4] to [9eed7b965b].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | // Grammalecte - Conjugueur // License: GPL 3 "use strict"; ${map} var conj = { _lVtyp: [], _lTags: [], _dPatternConj: {}, _dVerb: {}, | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | // Grammalecte - Conjugueur // License: GPL 3 "use strict"; ${map} if (typeof(require) !== 'undefined') { var helpers = require("resource://grammalecte/helpers.js"); } var conj = { _lVtyp: [], _lTags: [], _dPatternConj: {}, _dVerb: {}, |
︙ | ︙ | |||
479 480 481 482 483 484 485 | // Initialization if (typeof(browser) !== 'undefined') { // WebExtension (but not in Worker) conj.init(helpers.loadFile(browser.extension.getURL("grammalecte/fr/conj_data.json"))); } else if (typeof(require) !== 'undefined') { // Add-on SDK and Thunderbird | < | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | // Initialization if (typeof(browser) !== 'undefined') { // WebExtension (but not in Worker) conj.init(helpers.loadFile(browser.extension.getURL("grammalecte/fr/conj_data.json"))); } else if (typeof(require) !== 'undefined') { // Add-on SDK and Thunderbird conj.init(helpers.loadFile("resource://grammalecte/fr/conj_data.json")); } else if (typeof(self) !== 'undefined' && typeof(self.port) !== 'undefined' && typeof(self.port.on) !== "undefined") { // used within Firefox content script (conjugation panel). // can’t load JSON from here, so we do it in ui.js and send it here. self.port.on("provideConjData", function (sJSONData) { conj.init(sJSONData); }); |
︙ | ︙ |