Grammalecte  Check-in [ecd1e8587f]

Overview
Comment:[fx] WebExt: try to protect elements from CSS inheritance (grammar checker)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: ecd1e8587f8c0ec6059696b857ff2c57feb2c0b5f870b436ba9df25c7fd283b4
User & Date: olr on 2017-09-03 09:12:28
Other Links: manifest | tags
Context
2017-09-04
07:06
[fx] WebExt: adjust text formatter height check-in: e6ab950ba7 user: olr tags: trunk, fx
2017-09-03
09:12
[fx] WebExt: try to protect elements from CSS inheritance (grammar checker) check-in: ecd1e8587f user: olr tags: trunk, fx
2017-09-02
19:31
[fx] WebExt: use transparency for the wrapper check-in: 181dd4ee47 user: olr tags: trunk, fx
Changes

Modified gc_lang/fr/webext/content_scripts/panel.css from [bfeefb8950] to [20148f5873].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


19
20
21
22
23
24
25
26

27
28
29
30
31
32
33
/*
    CSS
    Content panels for Grammalecte
*/

.grammalecte_panel {
    padding: 0;
    margin: 0;
    position: fixed;
    box-sizing: content-box;
    z-index: 2147483640; /* maximum is 2147483647: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index */
    border: 2px solid hsl(210, 0%, 50%);
    border-radius: 10px 10px 10px 10px;
    background-color: hsl(210, 20%, 100%);
    color: hsl(210, 10%, 4%);
    font-family: "Trebuchet MS", "Liberation Sans", sans-serif;
    box-shadow: 0 0 4px 2px hsl(210, 0%, 50%);
    line-height: normal;


}

.grammalecte_panel_bar {
    position: sticky;
    width: 100%;
    background-color: hsl(210, 0%, 90%);
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid hsl(210, 10%, 80%);

    font-size: 20px;
}
.grammalecte_panel_title {
    padding: 10px 20px;
}
.grammalecte_panel_label {
    display: inline-block;











|

|
|

|

>
>








>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
    CSS
    Content panels for Grammalecte
*/

.grammalecte_panel {
    padding: 0;
    margin: 0;
    position: fixed;
    box-sizing: content-box;
    z-index: 2147483640; /* maximum is 2147483647: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index */
    border: 2px solid hsl(210, 10%, 50%);
    border-radius: 10px 10px 10px 10px;
    background-color: hsl(210, 0%, 100%);
    color: hsl(0, 0%, 0%);
    font-family: "Trebuchet MS", "Liberation Sans", sans-serif;
    box-shadow: 0 0 2px 1px hsla(210, 50%, 50%, .5);
    line-height: normal;
    text-shadow: unset;
    text-decoration: none;
}

.grammalecte_panel_bar {
    position: sticky;
    width: 100%;
    background-color: hsl(210, 0%, 90%);
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid hsl(210, 10%, 80%);
    color: hsl(210, 10%, 4%);
    font-size: 20px;
}
.grammalecte_panel_title {
    padding: 10px 20px;
}
.grammalecte_panel_label {
    display: inline-block;

Modified gc_lang/fr/webext/content_scripts/panel_gc.css from [40500349b4] to [d79690b59e].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
    background-color: hsl(0, 0%, 96%);
    border-radius: 2px;
    font-size: 14px;
    font-family : "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace;
    color: hsl(0, 0%, 0%);
}

.grammalecte_paragraph a {
    background-color: hsla(210, 50%, 50%, 1);
    padding: 1px 5px;
    border-radius: 2px;
    color: hsla(210, 0%, 96%, 1);
    cursor: pointer;
    text-decoration: none;
}
.grammalecte_paragraph a:hover {
    background-color: hsla(210, 60%, 40%, 1);
    color: hsla(0, 0%, 100%, 1);
    text-shadow: 0 0 3px hsl(210, 30%, 60%);
}

.grammalecte_paragraph u {
    text-decoration: none;
}

.grammalecte_paragraph u.corrected,
.grammalecte_paragraph u.ignored {
    background-color: hsla(120, 50%, 70%, 1);
    color: hsla(0, 0%, 4%, 1);
    border-radius: 2px;
    text-decoration: none;
}
.grammalecte_paragraph u.ignored {
    background-color: hsla(30, 20%, 80%, 1);
}

.grammalecte_paragraph u.error {
    position: relative;
    cursor: pointer;
    border-radius: 2px;
    text-decoration: none; /* to remove for wavy underlines */
}
.grammalecte_paragraph u.error:hover {
    cursor: pointer;
}


/*
    Action buttons
*/

.grammalecte_paragraph_actions {
    float: right;
    margin: 0 0 5px 10px;
}

.grammalecte_paragraph_actions .button {
    display: inline-block;
    background-color: hsl(0, 0%, 50%);
    text-align: center;
    margin-left: 2px;
    padding: 1px 4px 3px 4px;
    cursor: pointer;
    font-size: 14px;
    color: hsl(0, 0%, 96%);
    border-radius: 2px;
}
.grammalecte_paragraph_actions .button:hover {
    background-color: hsl(0, 0%, 40%);
    color: hsl(0, 0%, 100%);
}

.grammalecte_paragraph_actions .green {
    background-color: hsl(120, 30%, 50%);
    color: hsl(0, 0%, 96%);
}
.grammalecte_paragraph_actions .green:hover {
    background-color: hsl(120, 50%, 40%);
    color: hsl(0, 0%, 100%);
}
.grammalecte_paragraph_actions .red {
    background-color: hsl(0, 30%, 50%);
    color: hsl(0, 0%, 96%);
}
.grammalecte_paragraph_actions .red:hover {
    background-color: hsl(0, 50%, 40%);
    color: hsl(0, 0%, 100%);
}
.grammalecte_paragraph_actions .orange {
    background-color: hsl(30, 50%, 50%);
    color: hsl(30, 0%, 96%);
}
.grammalecte_paragraph_actions .orange:hover {
    background-color: hsl(30, 70%, 40%);
    color: hsl(30, 0%, 100%);
}
.grammalecte_paragraph_actions .bold {
    font-weight: bold;
}



/* 
    TOOLTIP
*/
#grammalecte_tooltip_arrow {
    position: absolute;







<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



<





|










|




|



|



|



|



<
<
<
<
<
<
<
<
<
<
<
<







16
17
18
19
20
21
22







23
































24
25
26

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63












64
65
66
67
68
69
70
    background-color: hsl(0, 0%, 96%);
    border-radius: 2px;
    font-size: 14px;
    font-family : "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace;
    color: hsl(0, 0%, 0%);
}









































/*
    Action buttons
*/

.grammalecte_paragraph_actions {
    float: right;
    margin: 0 0 5px 10px;
}

.grammalecte_paragraph_button {
    display: inline-block;
    background-color: hsl(0, 0%, 50%);
    text-align: center;
    margin-left: 2px;
    padding: 1px 4px 3px 4px;
    cursor: pointer;
    font-size: 14px;
    color: hsl(0, 0%, 96%);
    border-radius: 2px;
}
.grammalecte_paragraph_button:hover {
    background-color: hsl(0, 0%, 40%);
    color: hsl(0, 0%, 100%);
}

.grammalecte_paragraph_actions .grammalecte_green {
    background-color: hsl(120, 30%, 50%);
    color: hsl(0, 0%, 96%);
}
.grammalecte_paragraph_actions .grammalecte_green:hover {
    background-color: hsl(120, 50%, 40%);
    color: hsl(0, 0%, 100%);
}
.grammalecte_paragraph_actions .grammalecte_red {
    background-color: hsl(0, 30%, 50%);
    color: hsl(0, 0%, 96%);
}
.grammalecte_paragraph_actions .grammalecte_red:hover {
    background-color: hsl(0, 50%, 40%);
    color: hsl(0, 0%, 100%);
}














/* 
    TOOLTIP
*/
#grammalecte_tooltip_arrow {
    position: absolute;
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
    box-shadow: 0 0 6px hsla(0, 0%, 0%, 0.3);
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 12px;
    line-height: 18px;
    cursor: default;
    text-decoration: none;
    border: 3px solid hsl(210, 50%, 30%);
    color: hsla(210, 10%, 20%, 1);
    z-index: 1000;
}

#grammalecte_tooltip_message_block {
    margin: 0;
    padding: 5px 10px 10px 10px;
    background-color: hsl(210, 50%, 30%);







|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
    box-shadow: 0 0 6px hsla(0, 0%, 0%, 0.3);
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 12px;
    line-height: 18px;
    cursor: default;
    text-decoration: none;
    border: 3px solid hsl(210, 50%, 30%);
    color: hsl(210, 10%, 20%);
    z-index: 1000;
}

#grammalecte_tooltip_message_block {
    margin: 0;
    padding: 5px 10px 10px 10px;
    background-color: hsl(210, 50%, 30%);
160
161
162
163
164
165
166
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207

208
209
210
211
212

213
214
215
216
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
}
#grammalecte_tooltip_message {
    font-size: 15px;
    margin: 0 0 5px 0;
}
#grammalecte_tooltip_ignore {
    display: inline-block;
    padding: 2px 5px;
    background-color: hsla(30, 30%, 40%, 1);
    color: hsla(30, 0%, 96%, 1);
    border-radius: 2px;
    cursor: pointer;

    text-decoration: none;
}
#grammalecte_tooltip_ignore:hover {
    background-color: hsla(30, 30%, 50%, 1);
    color: hsla(0, 0%, 100%, 1);
    text-shadow: 0 0 3px hsl(30, 30%, 60%);
}
#grammalecte_tooltip_url {
    display: inline-block;
    margin: 0 0 0 10px;
    padding: 2px 5px;
    background-color: hsla(210, 50%, 50%, 1);
    color: hsla(210, 0%, 96%, 1);
    border-radius: 2px;
    cursor: pointer;

    text-decoration: none;
}
#grammalecte_tooltip_url:hover {
    background-color: hsla(210, 50%, 60%, 1);
    color: hsla(0, 0%, 100%, 1);
    text-shadow: 0 0 3px hsl(210, 30%, 60%);
}
#grammalecte_tooltip_sugg_title {
    padding: 0 10px;
    background-color: hsl(210, 10%, 90%);
    color: hsl(210, 50%, 30%);
    font-size: 10px;
    font-weight: bold;
}
#grammalecte_tooltip_sugg_block {
    padding: 10px;
    background-color: hsl(210, 10%, 96%);
    border-radius: 0 0 2px 2px;
    line-height: 20px;
}
#grammalecte_tooltip_sugg_block a.sugg {

    padding: 1px 6px;
    background-color: hsla(180, 60%, 40%, 1);
    color: hsla(180, 0%, 96%, 1);
    border-radius: 2px;
    cursor: pointer;

    text-decoration: none;
}
#grammalecte_tooltip_sugg_block a.sugg:hover {
    background-color: hsla(180, 70%, 45%, 1);
    color: hsla(0, 0%, 100%, 1);
}


/*
    ERRORS
*/

.grammalecte_paragraph .error {




    /* default color */
    background-color: hsl(240, 10%, 50%);
    color: hsl(240, 0%, 96%);
}
.grammalecte_paragraph .error:hover {
    background-color: hsl(240, 10%, 40%);
    color: hsl(240, 0%, 100%);
}














/* elems */
.grammalecte_paragraph .WORD {
    background-color: hsl(0, 50%, 50%);
    color: hsl(0, 0%, 96%);
    /*text-decoration: underline wavy hsl(0, 50%, 50%);*/
}
.grammalecte_paragraph .WORD:hover {
    background-color: hsl(0, 60%, 40%);
    color: hsl(0, 0%, 100%);
}

/* elems */
.grammalecte_paragraph .typo, 
.grammalecte_paragraph .esp, 
.grammalecte_paragraph .nbsp, 
.grammalecte_paragraph .eif, 
.grammalecte_paragraph .maj, 
.grammalecte_paragraph .virg, 
.grammalecte_paragraph .tu, 
.grammalecte_paragraph .num, 
.grammalecte_paragraph .unit, 
.grammalecte_paragraph .nf, 
.grammalecte_paragraph .liga, 
.grammalecte_paragraph .mapos, 
.grammalecte_paragraph .chim {
    background-color: hsl(30, 70%, 50%);
    color: hsl(30, 10%, 96%);
    /*text-decoration: underline wavy hsl(30, 70%, 50%);*/
}

.grammalecte_paragraph .typo:hover, 
.grammalecte_paragraph .esp:hover, 
.grammalecte_paragraph .nbsp:hover, 
.grammalecte_paragraph .eif:hover, 
.grammalecte_paragraph .maj:hover, 
.grammalecte_paragraph .virg:hover, 
.grammalecte_paragraph .tu:hover, 
.grammalecte_paragraph .num:hover, 
.grammalecte_paragraph .unit:hover, 
.grammalecte_paragraph .nf:hover, 
.grammalecte_paragraph .liga:hover, 
.grammalecte_paragraph .mapos:hover, 
.grammalecte_paragraph .chim:hover {
    background-color: hsl(30, 80%, 45%);
    color: hsl(30, 10%, 96%);
}

/* elems */
.grammalecte_paragraph .apos {
    background-color: hsl(40, 90%, 50%);
    color: hsl(40, 10%, 96%);
    /*text-decoration: underline wavy hsl(40, 70%, 45%);*/
}
.grammalecte_paragraph .apos:hover {
    background-color: hsl(40, 100%, 45%);
    color: hsl(40, 10%, 96%);
}

/* elems */
.grammalecte_paragraph .gn,
.grammalecte_paragraph .sgpl {
    background-color: hsl(210, 50%, 50%);
    color: hsl(210, 10%, 96%);
    /*text-decoration: underline wavy hsl(210, 50%, 50%);*/
}
.grammalecte_paragraph .gn:hover,
.grammalecte_paragraph .sgpl:hover {
    background-color: hsl(210, 60%, 40%);
    color: hsl(210, 10%, 96%);
}

/* elems */
.grammalecte_paragraph .conj, 
.grammalecte_paragraph .infi, 
.grammalecte_paragraph .imp, 
.grammalecte_paragraph .inte, 
.grammalecte_paragraph .ppas, 
.grammalecte_paragraph .vmode  {
    background-color: hsl(300, 30%, 40%);
    color: hsl(300, 10%, 96%);
    /*text-decoration: underline wavy hsl(300, 40%, 40%);*/
}

.grammalecte_paragraph .conj:hover, 
.grammalecte_paragraph .infi:hover, 
.grammalecte_paragraph .imp:hover, 
.grammalecte_paragraph .inte:hover, 
.grammalecte_paragraph .ppas:hover, 
.grammalecte_paragraph .vmode:hover {
    background-color: hsl(300, 40%, 30%);
    color: hsl(300, 10%, 96%);
}

/* elems */
.grammalecte_paragraph .conf, 
.grammalecte_paragraph .ocr {
    background-color: hsl(270, 40%, 30%);
    color: hsl(270, 10%, 96%);
    /*text-decoration: underline wavy hsl(270, 40%, 30%);*/
}

.grammalecte_paragraph .conf:hover, 
.grammalecte_paragraph .ocr:hover {
    background-color: hsl(270, 50%, 20%);
    color: hsl(270, 10%, 96%);
}

/* elems */
.grammalecte_paragraph .bs, 
.grammalecte_paragraph .pleo, 
.grammalecte_paragraph .neg, 
.grammalecte_paragraph .redon1, 
.grammalecte_paragraph .redon2, 
.grammalecte_paragraph .mc, 
.grammalecte_paragraph .date, 
.grammalecte_paragraph .notype {
    background-color: hsl(180, 50%, 40%);
    color: hsl(180, 10%, 96%);
    /*text-decoration: underline wavy hsl(180, 50%, 40%);*/
}

.grammalecte_paragraph .bs:hover, 
.grammalecte_paragraph .pleo:hover, 
.grammalecte_paragraph .neg:hover, 
.grammalecte_paragraph .redon1:hover, 
.grammalecte_paragraph .redon2:hover, 
.grammalecte_paragraph .mc:hover, 
.grammalecte_paragraph .date:hover, 
.grammalecte_paragraph .notype:hover {
    background-color: hsl(180, 60%, 30%);
    color: hsl(180, 10%, 96%);
}







|
|



>



|





|
|
|



>



|
















|
>

|
|


>


|








<
|
>
>
>
>




|




>
>
>
>
>
>
>
>
>
>
>
>
>

|




|





|
|
|
|
|
|
|
|
|
|
|
|
|





|
|
|
|
|
|
|
|
|
|
|
|
|





|




|





|
|




|
|





|
|
|
|
|
|





|
|
|
|
|
|





|
|





|
|





|
|
|
|
|
|
|
|





|
|
|
|
|
|
|
|



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
}
#grammalecte_tooltip_message {
    font-size: 15px;
    margin: 0 0 5px 0;
}
#grammalecte_tooltip_ignore {
    display: inline-block;
    padding: 1px 5px;
    background-color: hsl(30, 30%, 40%);
    color: hsla(30, 0%, 96%, 1);
    border-radius: 2px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}
#grammalecte_tooltip_ignore:hover {
    background-color: hsl(30, 30%, 50%);
    color: hsla(0, 0%, 100%, 1);
    text-shadow: 0 0 3px hsl(30, 30%, 60%);
}
#grammalecte_tooltip_url {
    display: inline-block;
    margin-left: 10px;
    padding: 1px 5px;
    background-color: hsl(210, 50%, 50%);
    color: hsla(210, 0%, 96%, 1);
    border-radius: 2px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}
#grammalecte_tooltip_url:hover {
    background-color: hsl(210, 50%, 60%);
    color: hsla(0, 0%, 100%, 1);
    text-shadow: 0 0 3px hsl(210, 30%, 60%);
}
#grammalecte_tooltip_sugg_title {
    padding: 0 10px;
    background-color: hsl(210, 10%, 90%);
    color: hsl(210, 50%, 30%);
    font-size: 10px;
    font-weight: bold;
}
#grammalecte_tooltip_sugg_block {
    padding: 10px;
    background-color: hsl(210, 10%, 96%);
    border-radius: 0 0 2px 2px;
    line-height: 20px;
}
.grammalecte_tooltip_sugg {
    display: inline-block;
    padding: 1px 6px;
    background-color: hsl(180, 60%, 40%);
    color: hsl(180, 0%, 96%);
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}
.grammalecte_tooltip_sugg:hover {
    background-color: hsla(180, 70%, 45%, 1);
    color: hsla(0, 0%, 100%, 1);
}


/*
    ERRORS
*/

.grammalecte_error {
    cursor: pointer;
    border-radius: 2px;
    text-decoration: none;
    text-shadow: unset;
    /* default color */
    background-color: hsl(240, 10%, 50%);
    color: hsl(240, 0%, 96%);
}
.grammalecte_error:hover {
    background-color: hsl(240, 10%, 40%);
    color: hsl(240, 0%, 100%);
}

.grammalecte_error_corrected,
.grammalecte_error_ignored {
    display: inline-block;
    border-radius: 2px;
    text-decoration: none;
    background-color: hsla(120, 50%, 70%, 1);
    color: hsla(0, 0%, 4%, 1);
}
.grammalecte_error_ignored {
    background-color: hsla(30, 20%, 80%, 1);
}


/* elems */
.grammalecte_error_WORD {
    background-color: hsl(0, 50%, 50%);
    color: hsl(0, 0%, 96%);
    /*text-decoration: underline wavy hsl(0, 50%, 50%);*/
}
.grammalecte_error_WORD:hover {
    background-color: hsl(0, 60%, 40%);
    color: hsl(0, 0%, 100%);
}

/* elems */
.grammalecte_error_typo, 
.grammalecte_error_esp, 
.grammalecte_error_nbsp, 
.grammalecte_error_eif, 
.grammalecte_error_maj, 
.grammalecte_error_virg, 
.grammalecte_error_tu, 
.grammalecte_error_num, 
.grammalecte_error_unit, 
.grammalecte_error_nf, 
.grammalecte_error_liga, 
.grammalecte_error_mapos, 
.grammalecte_error_chim {
    background-color: hsl(30, 70%, 50%);
    color: hsl(30, 10%, 96%);
    /*text-decoration: underline wavy hsl(30, 70%, 50%);*/
}

.grammalecte_error_typo:hover, 
.grammalecte_error_esp:hover, 
.grammalecte_error_nbsp:hover, 
.grammalecte_error_eif:hover, 
.grammalecte_error_maj:hover, 
.grammalecte_error_virg:hover, 
.grammalecte_error_tu:hover, 
.grammalecte_error_num:hover, 
.grammalecte_error_unit:hover, 
.grammalecte_error_nf:hover, 
.grammalecte_error_liga:hover, 
.grammalecte_error_mapos:hover, 
.grammalecte_error_chim:hover {
    background-color: hsl(30, 80%, 45%);
    color: hsl(30, 10%, 96%);
}

/* elems */
.grammalecte_error_apos {
    background-color: hsl(40, 90%, 50%);
    color: hsl(40, 10%, 96%);
    /*text-decoration: underline wavy hsl(40, 70%, 45%);*/
}
.grammalecte_error_apos:hover {
    background-color: hsl(40, 100%, 45%);
    color: hsl(40, 10%, 96%);
}

/* elems */
.grammalecte_error_gn,
.grammalecte_error_sgpl {
    background-color: hsl(210, 50%, 50%);
    color: hsl(210, 10%, 96%);
    /*text-decoration: underline wavy hsl(210, 50%, 50%);*/
}
.grammalecte_error_gn:hover,
.grammalecte_error_sgpl:hover {
    background-color: hsl(210, 60%, 40%);
    color: hsl(210, 10%, 96%);
}

/* elems */
.grammalecte_error_conj, 
.grammalecte_error_infi, 
.grammalecte_error_imp, 
.grammalecte_error_inte, 
.grammalecte_error_ppas, 
.grammalecte_error_vmode  {
    background-color: hsl(300, 30%, 40%);
    color: hsl(300, 10%, 96%);
    /*text-decoration: underline wavy hsl(300, 40%, 40%);*/
}

.grammalecte_error_conj:hover, 
.grammalecte_error_infi:hover, 
.grammalecte_error_imp:hover, 
.grammalecte_error_inte:hover, 
.grammalecte_error_ppas:hover, 
.grammalecte_error_vmode:hover {
    background-color: hsl(300, 40%, 30%);
    color: hsl(300, 10%, 96%);
}

/* elems */
.grammalecte_error_conf, 
.grammalecte_error_ocr {
    background-color: hsl(270, 40%, 30%);
    color: hsl(270, 10%, 96%);
    /*text-decoration: underline wavy hsl(270, 40%, 30%);*/
}

.grammalecte_error_conf:hover, 
.grammalecte_error_ocr:hover {
    background-color: hsl(270, 50%, 20%);
    color: hsl(270, 10%, 96%);
}

/* elems */
.grammalecte_error_bs, 
.grammalecte_error_pleo, 
.grammalecte_error_neg, 
.grammalecte_error_redon1, 
.grammalecte_error_redon2, 
.grammalecte_error_mc, 
.grammalecte_error_date, 
.grammalecte_error_notype {
    background-color: hsl(180, 50%, 40%);
    color: hsl(180, 10%, 96%);
    /*text-decoration: underline wavy hsl(180, 50%, 40%);*/
}

.grammalecte_error_bs:hover, 
.grammalecte_error_pleo:hover, 
.grammalecte_error_neg:hover, 
.grammalecte_error_redon1:hover, 
.grammalecte_error_redon2:hover, 
.grammalecte_error_mc:hover, 
.grammalecte_error_date:hover, 
.grammalecte_error_notype:hover {
    background-color: hsl(180, 60%, 30%);
    color: hsl(180, 10%, 96%);
}

Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [56586fa99f] to [e831e6f9ab].

10
11
12
13
14
15
16
17
18

19
20
21
22
23
24
25
                oGrammalecte.oGCPanel.applySuggestion(xElem.id);
            } else if (xElem.id === "grammalecte_tooltip_ignore") {
                oGrammalecte.oGCPanel.ignoreError(xElem.id);
            } else if (xElem.id.startsWith("grammalecte_check")) {
                oGrammalecte.oGCPanel.recheckParagraph(parseInt(xElem.dataset.para_num));
            } else if (xElem.id.startsWith("grammalecte_hide")) {
                xElem.parentNode.parentNode.style.display = "none";
            } else if (xElem.tagName === "U" && xElem.id.startsWith("grammalecte_err")
                       && xElem.className !== "corrected" && xElem.className !== "ignored") {

                oGrammalecte.oGCPanel.oTooltip.show(xElem.id);
            } else if (xElem.id === "grammalecte_tooltip_url") {
                oGrammalecte.oGCPanel.openURL(xElem.dataset.url);
            } else {
                oGrammalecte.oGCPanel.oTooltip.hide();
            }
        } else {







|
|
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
                oGrammalecte.oGCPanel.applySuggestion(xElem.id);
            } else if (xElem.id === "grammalecte_tooltip_ignore") {
                oGrammalecte.oGCPanel.ignoreError(xElem.id);
            } else if (xElem.id.startsWith("grammalecte_check")) {
                oGrammalecte.oGCPanel.recheckParagraph(parseInt(xElem.dataset.para_num));
            } else if (xElem.id.startsWith("grammalecte_hide")) {
                xElem.parentNode.parentNode.style.display = "none";
            } else if (xElem.id.startsWith("grammalecte_err")
                       && xElem.className !== "grammalecte_error_corrected"
                       && xElem.className !== "grammalecte_error_ignored") {
                oGrammalecte.oGCPanel.oTooltip.show(xElem.id);
            } else if (xElem.id === "grammalecte_tooltip_url") {
                oGrammalecte.oGCPanel.openURL(xElem.dataset.url);
            } else {
                oGrammalecte.oGCPanel.oTooltip.hide();
            }
        } else {
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94

    addParagraphResult (oResult) {
        try {
            if (oResult && oResult.sParagraph.trim() !== "" && (oResult.aGrammErr.length > 0 || oResult.aSpellErr.length > 0)) {
                let xNodeDiv = createNode("div", {className: "grammalecte_paragraph_block"});
                // actions
                let xActionsBar = createNode("div", {className: "grammalecte_paragraph_actions"});
                xActionsBar.appendChild(createNode("div", {id: "grammalecte_check" + oResult.iParaNum, className: "button green", textContent: "Réanalyser"}, {para_num: oResult.iParaNum}));
                xActionsBar.appendChild(createNode("div", {id: "grammalecte_hide" + oResult.iParaNum, className: "button red bold", textContent: "×"}));
                // paragraph
                let xParagraph = createNode("p", {id: "grammalecte_paragraph"+oResult.iParaNum, lang: "fr", contentEditable: "true"}, {para_num: oResult.iParaNum});
                xParagraph.setAttribute("spellcheck", "false"); // doesn’t seem possible to use “spellcheck” as a common attribute.
                xParagraph.className = (oResult.aGrammErr.length || oResult.aSpellErr.length) ? "grammalecte_paragraph softred" : "grammalecte_paragraph";
                xParagraph.addEventListener("keyup", function (xEvent) {
                    this.oTAC.setParagraph(parseInt(xEvent.target.dataset.para_num), this.purgeText(xEvent.target.textContent));
                    this.oTAC.write();
                }.bind(this)
                , true);
                this._tagParagraph(xParagraph, oResult.sParagraph, oResult.iParaNum, oResult.aGrammErr, oResult.aSpellErr);
                // creation







|
|

|

<







76
77
78
79
80
81
82
83
84
85
86
87

88
89
90
91
92
93
94

    addParagraphResult (oResult) {
        try {
            if (oResult && oResult.sParagraph.trim() !== "" && (oResult.aGrammErr.length > 0 || oResult.aSpellErr.length > 0)) {
                let xNodeDiv = createNode("div", {className: "grammalecte_paragraph_block"});
                // actions
                let xActionsBar = createNode("div", {className: "grammalecte_paragraph_actions"});
                xActionsBar.appendChild(createNode("div", {id: "grammalecte_check" + oResult.iParaNum, className: "grammalecte_paragraph_button grammalecte_green", textContent: "Réanalyser"}, {para_num: oResult.iParaNum}));
                xActionsBar.appendChild(createNode("div", {id: "grammalecte_hide" + oResult.iParaNum, className: "grammalecte_paragraph_button grammalecte_red", textContent: "×", style: "font-weight: bold;"}));
                // paragraph
                let xParagraph = createNode("p", {id: "grammalecte_paragraph"+oResult.iParaNum, className: "grammalecte_paragraph", lang: "fr", contentEditable: "true"}, {para_num: oResult.iParaNum});
                xParagraph.setAttribute("spellcheck", "false"); // doesn’t seem possible to use “spellcheck” as a common attribute.

                xParagraph.addEventListener("keyup", function (xEvent) {
                    this.oTAC.setParagraph(parseInt(xEvent.target.dataset.para_num), this.purgeText(xEvent.target.textContent));
                    this.oTAC.write();
                }.bind(this)
                , true);
                this._tagParagraph(xParagraph, oResult.sParagraph, oResult.iParaNum, oResult.aGrammErr, oResult.aSpellErr);
                // creation
165
166
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
        }
        catch (e) {
            showError(e);
        }
    }

    _createError (sUnderlined, oErr) {
        let xNodeErr = document.createElement("u");
        xNodeErr.id = "grammalecte_err" + oErr['sErrorId'];
        xNodeErr.textContent = sUnderlined;
        xNodeErr.dataset.error_id = oErr['sErrorId'];
        xNodeErr.dataset.ignored_key = oErr['sIgnoredKey'];
        xNodeErr.dataset.error_type = (oErr['sType'] === "WORD") ? "spelling" : "grammar";
        if (xNodeErr.dataset.error_type === "grammar") {
            xNodeErr.dataset.gc_message = oErr['sMessage'];
            xNodeErr.dataset.gc_url = oErr['URL'];
            if (xNodeErr.dataset.gc_message.includes(" #")) {
                xNodeErr.dataset.line_id = oErr['sLineId'];
                xNodeErr.dataset.rule_id = oErr['sRuleId'];
            }
            xNodeErr.dataset.suggestions = oErr["aSuggestions"].join("|");
        }
        xNodeErr.className = (this.aIgnoredErrors.has(xNodeErr.dataset.ignored_key)) ? "ignored" : "error " + oErr['sType'];
        return xNodeErr;
    }

    blockParagraph (xParagraph) {
        xParagraph.contentEditable = "false";
        document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "Analyse…";
    }

    freeParagraph (xParagraph) {
        xParagraph.contentEditable = "true";
        document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "Réanalyser";
    }

    applySuggestion (sNodeSuggId) { // sugg
        try {
            let sErrorId = document.getElementById(sNodeSuggId).dataset.error_id;
            //let sParaNum = sErrorId.slice(0, sErrorId.indexOf("-"));
            let xNodeErr = document.getElementById("grammalecte_err" + sErrorId);
            xNodeErr.textContent = document.getElementById(sNodeSuggId).textContent;
            xNodeErr.className = "corrected";
            xNodeErr.removeAttribute("style");
            this.oTooltip.hide();
            this.recheckParagraph(parseInt(sErrorId.slice(0, sErrorId.indexOf("-"))));
        }
        catch (e) {
            showError(e);
        }
    }

    ignoreError (sIgnoreButtonId) {  // ignore
        try {
            let sErrorId = document.getElementById(sIgnoreButtonId).dataset.error_id;
            let xNodeErr = document.getElementById("grammalecte_err" + sErrorId);
            this.aIgnoredErrors.add(xNodeErr.dataset.ignored_key);
            xNodeErr.className = "ignored";
            this.oTooltip.hide();
        }
        catch (e) {
            showError(e);
        }
    }








|














|



















|














|







165
166
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
        }
        catch (e) {
            showError(e);
        }
    }

    _createError (sUnderlined, oErr) {
        let xNodeErr = document.createElement("mark");
        xNodeErr.id = "grammalecte_err" + oErr['sErrorId'];
        xNodeErr.textContent = sUnderlined;
        xNodeErr.dataset.error_id = oErr['sErrorId'];
        xNodeErr.dataset.ignored_key = oErr['sIgnoredKey'];
        xNodeErr.dataset.error_type = (oErr['sType'] === "WORD") ? "spelling" : "grammar";
        if (xNodeErr.dataset.error_type === "grammar") {
            xNodeErr.dataset.gc_message = oErr['sMessage'];
            xNodeErr.dataset.gc_url = oErr['URL'];
            if (xNodeErr.dataset.gc_message.includes(" #")) {
                xNodeErr.dataset.line_id = oErr['sLineId'];
                xNodeErr.dataset.rule_id = oErr['sRuleId'];
            }
            xNodeErr.dataset.suggestions = oErr["aSuggestions"].join("|");
        }
        xNodeErr.className = (this.aIgnoredErrors.has(xNodeErr.dataset.ignored_key)) ? "grammalecte_error_ignored" : "grammalecte_error grammalecte_error_" + oErr['sType'];
        return xNodeErr;
    }

    blockParagraph (xParagraph) {
        xParagraph.contentEditable = "false";
        document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "Analyse…";
    }

    freeParagraph (xParagraph) {
        xParagraph.contentEditable = "true";
        document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "Réanalyser";
    }

    applySuggestion (sNodeSuggId) { // sugg
        try {
            let sErrorId = document.getElementById(sNodeSuggId).dataset.error_id;
            //let sParaNum = sErrorId.slice(0, sErrorId.indexOf("-"));
            let xNodeErr = document.getElementById("grammalecte_err" + sErrorId);
            xNodeErr.textContent = document.getElementById(sNodeSuggId).textContent;
            xNodeErr.className = "grammalecte_error_corrected";
            xNodeErr.removeAttribute("style");
            this.oTooltip.hide();
            this.recheckParagraph(parseInt(sErrorId.slice(0, sErrorId.indexOf("-"))));
        }
        catch (e) {
            showError(e);
        }
    }

    ignoreError (sIgnoreButtonId) {  // ignore
        try {
            let sErrorId = document.getElementById(sIgnoreButtonId).dataset.error_id;
            let xNodeErr = document.getElementById("grammalecte_err" + sErrorId);
            this.aIgnoredErrors.add(xNodeErr.dataset.ignored_key);
            xNodeErr.className = "grammalecte_error_ignored";
            this.oTooltip.hide();
        }
        catch (e) {
            showError(e);
        }
    }

363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379

    hide () {
        this.xTooltipArrow.style.display = "none";
        this.xTooltip.style.display = "none";
    }

    _createSuggestion (sErrId, iSugg, sSugg) {
        let xNodeSugg = document.createElement("a");
        xNodeSugg.id = "grammalecte_sugg" + sErrId + "--" + iSugg.toString();
        xNodeSugg.className = "sugg";
        xNodeSugg.dataset.error_id = sErrId;
        xNodeSugg.textContent = sSugg;
        return xNodeSugg;
    }

    setSpellSuggestionsFor (sWord, sSuggestions, sErrId) {
        // spell checking suggestions







|

|







363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379

    hide () {
        this.xTooltipArrow.style.display = "none";
        this.xTooltip.style.display = "none";
    }

    _createSuggestion (sErrId, iSugg, sSugg) {
        let xNodeSugg = document.createElement("div");
        xNodeSugg.id = "grammalecte_sugg" + sErrId + "--" + iSugg.toString();
        xNodeSugg.className = "grammalecte_tooltip_sugg";
        xNodeSugg.dataset.error_id = sErrId;
        xNodeSugg.textContent = sSugg;
        return xNodeSugg;
    }

    setSpellSuggestionsFor (sWord, sSuggestions, sErrId) {
        // spell checking suggestions