1
2
3
4
5
6
7
8
9
10
|
1
2
3
4
5
6
7
8
9
10
|
-
+
|
// JavaScript
const Cu = Components.utils;
//const Cu = Components.utils;
//const { require } = Cu.import("resource://gre/modules/commonjs/toolkit/require.js", {});
//const conj = require("resource://grammalecte/fr/conj.js");
let oConj = {
init: function () {
console.log("Init conjugueur");
|
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
+
-
+
|
this._displayResults();
});
document.getElementById('otco').addEventListener("click", (xEvent) => {
this._displayResults();
});
}
catch (e) {
console.error(e);
Cu.reportError(e);
// Cu.reportError(e);
}
this.conjugate("être");
},
oVerb: null,
getVerbAndConjugate: function () {
|
︙ | | |
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
+
-
+
|
document.getElementById('otco').style = "color: #000;";
}
this._displayResults();
}
}
}
catch (e) {
console.error(e);
Cu.reportError(e);
// Cu.reportError(e);
}
},
_displayResults: function () {
if (this.oVerb === null) {
return;
}
|
︙ | | |
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
+
-
+
|
document.getElementById('condb4').textContent = " ";
document.getElementById('condb5').textContent = " ";
document.getElementById('condb6').textContent = " ";
}
document.getElementById('verb').Text = "";
}
catch (e) {
console.error(e);
Cu.reportError(e);
// Cu.reportError(e);
}
},
_setTitles: function () {
try {
if (!document.getElementById('otco').checked) {
document.getElementById('ipre_temps').textContent = "Présent";
|
︙ | | |
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
+
-
+
|
document.getElementById('simp_temps').textContent = "Plus-que-parfait";
document.getElementById('conda_temps').textContent = "Passé (1ʳᵉ forme)";
document.getElementById('condb_temps').textContent = "Passé (2ᵉ forme)";
document.getElementById('impe_temps').textContent = "Passé";
}
}
catch (e) {
console.error(e);
Cu.reportError(e);
// Cu.reportError(e);
}
}
};
conj.init(helpers.loadFile("resource://grammalecte/fr/conj_data.json"));
oConj.init();
|