unicode-input-toolconverter 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/.babelrc.json +3 -0
  2. package/.editorconfig +16 -0
  3. package/.nojekyll +0 -0
  4. package/.nyc_output/out.json +173804 -0
  5. package/.nyc_output/processinfo/index.json +1 -0
  6. package/CHANGES.md +11 -0
  7. package/COPYING.LESSER.txt +180 -0
  8. package/COPYING.txt +687 -0
  9. package/README.md +65 -0
  10. package/_locales/en-US/messages.json +3126 -0
  11. package/_locales/hu-HU/messages.json +3126 -0
  12. package/_locales/pt-BR/messages.json +3126 -0
  13. package/_locales/sv-SE/messages.json +3126 -0
  14. package/babel.config.json +5 -0
  15. package/browser_action/characterSelection.js +91 -0
  16. package/browser_action/charrefConverters.js +389 -0
  17. package/browser_action/chartBuild.js +155 -0
  18. package/browser_action/encodingBehaviors.js +72 -0
  19. package/browser_action/encodings.js +97 -0
  20. package/browser_action/entities.js +12 -0
  21. package/browser_action/entityBehaviors.js +96 -0
  22. package/browser_action/index-es.html +15 -0
  23. package/browser_action/index-instrumented.html +16 -0
  24. package/browser_action/index-pages.html +16 -0
  25. package/browser_action/index.html +16 -0
  26. package/browser_action/index.iife.min.js +2 -0
  27. package/browser_action/index.iife.min.js.map +1 -0
  28. package/browser_action/index.instrumented.iife.min.js +2 -0
  29. package/browser_action/index.instrumented.iife.min.js.map +1 -0
  30. package/browser_action/index.js +95 -0
  31. package/browser_action/preferences/prefDefaults.js +52 -0
  32. package/browser_action/service-worker/sw-activateCallback.js +53 -0
  33. package/browser_action/service-worker/sw-locales.json +6 -0
  34. package/browser_action/service-worker/sw-resources.json +73 -0
  35. package/browser_action/service-worker/sw-unicode-data.json +3 -0
  36. package/browser_action/styles/unicode-dialog.css +391 -0
  37. package/browser_action/templateUtils/elements.js +12 -0
  38. package/browser_action/templateUtils/fill.js +3 -0
  39. package/browser_action/templateUtils/validation.js +6 -0
  40. package/browser_action/templates/chartBuild.js +185 -0
  41. package/browser_action/templates/index.js +1304 -0
  42. package/browser_action/templatesElementCustomization/widgets.js +56 -0
  43. package/browser_action/unicode/UnicodeConverter.js +793 -0
  44. package/browser_action/unicode/charrefunicodeDb.js +258 -0
  45. package/browser_action/unicode/getScriptInfoForCodePoint.js +646 -0
  46. package/browser_action/unicode/hangul.js +253 -0
  47. package/browser_action/unicode/lastScriptNames.json +5 -0
  48. package/browser_action/unicode/parseUnihanFromTextFileStrings.js +56 -0
  49. package/browser_action/unicode/unicodeFieldInfo.js +120 -0
  50. package/browser_action/unicode/unicodeScripts.js +4912 -0
  51. package/browser_action/unicode/unihan.js +129 -0
  52. package/browser_action/unicode/unihanDbPopulate.js +26 -0
  53. package/browser_action/unicodecharref.js +1480 -0
  54. package/browser_action/utils/DOMUtils.js +122 -0
  55. package/browser_action/utils/FetchUtils.js +19 -0
  56. package/browser_action/utils/TextUtils.js +28 -0
  57. package/browser_action/utils/TypedArrayUtils.js +21 -0
  58. package/browser_action/utils/semicolonSeparatedToArray.js +12 -0
  59. package/browser_action/utils/setupServiceWorker.js +193 -0
  60. package/cypress.config.js +21 -0
  61. package/download/entities/copyright-software-20021231.html +70 -0
  62. package/download/entities/html5-uppercase.ent +54 -0
  63. package/download/entities/htmlmathml-f.ent +2164 -0
  64. package/download/entities/isoamsa.ent +201 -0
  65. package/download/entities/isoamsb.ent +177 -0
  66. package/download/entities/isoamsc.ent +77 -0
  67. package/download/entities/isoamsn.ent +148 -0
  68. package/download/entities/isoamso.ent +107 -0
  69. package/download/entities/isoamsr.ent +238 -0
  70. package/download/entities/isobox.ent +95 -0
  71. package/download/entities/isocyr1.ent +122 -0
  72. package/download/entities/isocyr2.ent +81 -0
  73. package/download/entities/isodia.ent +69 -0
  74. package/download/entities/isogrk1.ent +104 -0
  75. package/download/entities/isogrk2.ent +75 -0
  76. package/download/entities/isogrk3.ent +98 -0
  77. package/download/entities/isogrk4.ent +98 -0
  78. package/download/entities/isolat1.ent +117 -0
  79. package/download/entities/isolat2.ent +176 -0
  80. package/download/entities/isomfrk.ent +107 -0
  81. package/download/entities/isomopf.ent +81 -0
  82. package/download/entities/isomscr.ent +107 -0
  83. package/download/entities/isonum.ent +131 -0
  84. package/download/entities/isopub.ent +140 -0
  85. package/download/entities/isotech.ent +216 -0
  86. package/download/entities/mmlalias.ent +598 -0
  87. package/download/entities/mmlextra.ent +154 -0
  88. package/download/entities/predefined.ent +52 -0
  89. package/download/entities/w3centities-f.ent +2276 -0
  90. package/download/entities/xhtml1-lat1.ent +143 -0
  91. package/download/entities/xhtml1-special.ent +78 -0
  92. package/download/entities/xhtml1-symbol.ent +171 -0
  93. package/eslint.config.js +66 -0
  94. package/icons/openWindow16.png +0 -0
  95. package/icons/openWindow24.png +0 -0
  96. package/lgtm.yml +5 -0
  97. package/lib/background.html +11 -0
  98. package/lib/background.js +13 -0
  99. package/lib/overlay.css +6 -0
  100. package/manifest.json +37 -0
  101. package/package.json +121 -0
  102. package/polyfills/browser-polyfill.min.js +8 -0
  103. package/polyfills/browser-polyfill.min.js.map +1 -0
  104. package/server.js +61 -0
  105. package/sw.js +259 -0
  106. package/tools/entities-import.js +62 -0
  107. package/tools/findEsResources.js +30 -0
  108. package/tools/list-locales.js +17 -0
  109. package/tools/parseUnicodeCharts.js +428 -0
  110. package/tools/ucd-import.js +24 -0
  111. package/tools/unicode-charts.html +596 -0
  112. package/tools/unihan-import.js +72 -0
  113. package/unicode_copyright.txt +46 -0
  114. package/vendor/camelcase/index.js +110 -0
  115. package/vendor/fflate/esm/browser.js +2665 -0
  116. package/vendor/intl-dom/dist/index.esm.js +2962 -0
  117. package/vendor/jamilih/dist/jml-es.js +2359 -0
  118. package/vendor/jquery/dist/jquery.js +10716 -0
  119. package/vendor/json-6/dist/index.mjs +1783 -0
  120. package/vendor/miller-columns/dist/index-es.min.js +1 -0
  121. package/vendor/miller-columns/miller-columns.css +75 -0
  122. package/vendor/simple-prefs/dist/index.esm.js +286 -0
  123. package/web-ext-config.cjs +13 -0
@@ -0,0 +1,1304 @@
1
+ /* eslint-disable camelcase -- i18n */
2
+ import {jml, body, $, $$, nbsp} from '../../vendor/jamilih/dist/jml-es.js';
3
+ import {fill} from '../templateUtils/fill.js';
4
+ import {safeLink} from '../templateUtils/validation.js';
5
+ // import encodings from '../encodings.js';
6
+ import unicodeScripts from '../unicode/unicodeScripts.js';
7
+ import unicodecharref from '../unicodecharref.js';
8
+ import CharrefConverterBridges from '../charrefConverters.js';
9
+ import {registerDTD} from '../entityBehaviors.js';
10
+
11
+ const indexTemplate = function ({_, fonts}) {
12
+ $('html').lang = _.resolvedLocale;
13
+ document.title = _('uresults_title');
14
+ jml('div', {
15
+ role: 'main'
16
+ }, [
17
+ ['div', {
18
+ id: 'unicodeTabBox',
19
+ style: 'width: 700px;',
20
+ class: 'tabbox'
21
+ }, [
22
+ ['div', {class: 'tabs'}],
23
+ ['div', {
24
+ id: 'charts',
25
+ dataset: {
26
+ selected: true,
27
+ label: _('Charts_tab_label')
28
+ },
29
+ class: 'tabpanel'
30
+ }, [
31
+ ['div', {class: 'hbox'}, [
32
+ ['div', {
33
+ id: 'chart_selectchar_persist_vbox', class: 'vbox chartBox'
34
+ }, [
35
+ ['div', {id: 'selectChar'}, [
36
+ ['fieldset', [
37
+ ['legend', [_('caption_chart_selectchar')]],
38
+ ['div', {class: 'hbox'}, [
39
+ ['div', {title: _('desc_digits')}, [
40
+ ['label', {for: 'startset'}, [
41
+ _('charhexdecchoices')
42
+ ]]
43
+ ]],
44
+ ['div', [
45
+ ['label', {for: 'searchName'}, [
46
+ _('searchName')
47
+ ]]
48
+ ]],
49
+ ['div', [
50
+ ['label', {for: 'searchkDefinition'}, [
51
+ _('searchkDefinition')
52
+ ]]
53
+ ]]
54
+ ]],
55
+ ['div', {class: 'hbox'}, [
56
+ ['input', {
57
+ title: _('desc_digits'),
58
+ id: 'startset',
59
+ class: 'searchBox',
60
+ $on: {
61
+ async change () {
62
+ await unicodecharref.startset(this);
63
+ },
64
+ async input () {
65
+ await unicodecharref.startset(this);
66
+ }
67
+ }
68
+ }],
69
+ ['input', {
70
+ id: 'searchName',
71
+ class: 'searchBox',
72
+ $on: {
73
+ async change () {
74
+ await unicodecharref.searchUnicode(this);
75
+ },
76
+ async input () {
77
+ await unicodecharref.searchUnicode(this);
78
+ }
79
+ }
80
+ }],
81
+ ['input', {
82
+ id: 'searchkDefinition',
83
+ class: 'searchBox',
84
+ $on: {
85
+ change () {
86
+ unicodecharref.searchUnihan(this);
87
+ },
88
+ input () {
89
+ unicodecharref.searchUnihan(this);
90
+ }
91
+ }
92
+ }]
93
+ ]]
94
+ ]]
95
+ ]],
96
+ ['div', {id: 'chart_selectchar_persist'}, [
97
+ ['div', {id: 'menulists', class: 'vbox'}, [
98
+ ['fieldset', [
99
+ ['legend', [_('chooseregion')]],
100
+ ['div', {class: 'miller-breadcrumbs'}],
101
+ ['div', {class: 'miller-columns', tabindex: '1'}, [
102
+ unicodeScripts(_)
103
+ /*
104
+ // Avoid erring on missing
105
+ unicodeScripts((...args) => {
106
+ try {
107
+ return _(...args);
108
+ } catch (err) {
109
+ return args[0];
110
+ }
111
+ })
112
+ */
113
+ ]]
114
+ ]]
115
+ ]]
116
+ ]],
117
+ /*
118
+ // ['splitter'],
119
+ ['div', {id: 'specializedSearch', hidden: true}, [
120
+ ['fieldset', [
121
+ ['legend', [_('Specialized_search')]],
122
+ ['div', {
123
+ id: 'tabboxSearch',
124
+ class: 'tabbox'
125
+ }, [
126
+ ['div', {class: 'tabs'}, []],
127
+ ['div', {
128
+ id: 'regularSearch',
129
+ dataset: {
130
+ label: _('Regular_tab_label'),
131
+ title: _('Regular_tooltip'),
132
+ selected: true
133
+ },
134
+ class: 'tabpanel'
135
+ }, [
136
+ ['div', {class: 'hbox'}, [
137
+ ['div', {
138
+ id: 'searchGrid'
139
+ }, [
140
+ ['div', {
141
+ id: 'UnicodeSearch'
142
+ }]
143
+ ]]
144
+ ]]
145
+ ]],
146
+ ['div', {
147
+ id: 'cjkSearch',
148
+ dataset: {
149
+ label: _('CJK_tab_label'),
150
+ title: _('CJK_tooltip'),
151
+ selected: true
152
+ },
153
+ class: 'tabpanel'
154
+ }, [
155
+ ['div', {class: 'hbox'}, [
156
+ ['div', {id: 'searchGridCJK'}, [
157
+ ['div', {
158
+ id: 'UnihanSearch'
159
+ }]
160
+ ]]
161
+ ]]
162
+ ]]
163
+ ]]
164
+ ]]
165
+ ]],
166
+ */
167
+ // ['splitter'],
168
+ ['div', {id: 'chart_layout_persist'}, [
169
+ ['fieldset', [
170
+ ['legend', [_('caption_chart_layout')]],
171
+ ['div', {class: 'vbox'}, [
172
+ ['div', {class: 'hbox chartLayout'}, [
173
+ ['label', [
174
+ ['input', {
175
+ type: 'checkbox',
176
+ id: 'onlyentsyes',
177
+ class: 'charthbox',
178
+ $on: {
179
+ async click (e) {
180
+ await unicodecharref.onlyentsyesflip(e);
181
+ }
182
+ }
183
+ }],
184
+ _('label_onlyentsyesq')
185
+ ]]
186
+ ]],
187
+ ['div', [
188
+ ['div', {class: 'hbox chartLayout'}, [
189
+ ['label', [
190
+ _('label_norows'), nbsp.repeat(2),
191
+ ['input', {
192
+ id: 'rowsset',
193
+ $on: {
194
+ async change (e) {
195
+ await unicodecharref.rowsset(e);
196
+ }
197
+ }
198
+ }]
199
+ ]],
200
+ nbsp.repeat(4),
201
+ ['label', [
202
+ _('label_nocols'), nbsp.repeat(2),
203
+ ['input', {
204
+ id: 'colsset',
205
+ $on: {
206
+ async change (e) {
207
+ await unicodecharref.colsset(e);
208
+ }
209
+ }
210
+ }]
211
+ ]]
212
+ ]],
213
+ ['div', {class: 'hbox'}, [
214
+ ['label', {class: 'chartLayout'}, [
215
+ ['input', {
216
+ type: 'checkbox',
217
+ id: 'entyes',
218
+ class: 'charthbox',
219
+ $on: {
220
+ async click (e) {
221
+ await unicodecharref.entflip(e);
222
+ }
223
+ }
224
+ }],
225
+ _('label_entq')
226
+ ]],
227
+ nbsp.repeat(3),
228
+ ['label', [
229
+ ['input', {
230
+ type: 'checkbox',
231
+ id: 'decyes',
232
+ class: 'charthbox',
233
+ $on: {
234
+ async click (e) {
235
+ await unicodecharref.decflip(e);
236
+ }
237
+ }
238
+ }],
239
+ _('label_decq')
240
+ ]],
241
+ nbsp.repeat(3),
242
+ ['label', [
243
+ ['input', {
244
+ type: 'checkbox',
245
+ id: 'hexyes',
246
+ class: 'charthbox',
247
+ $on: {
248
+ async click (e) {
249
+ await unicodecharref.hexflip(e);
250
+ }
251
+ }
252
+ }],
253
+ _('label_hexq')
254
+ ]],
255
+ nbsp.repeat(3),
256
+ ['label', [
257
+ ['input', {
258
+ type: 'checkbox',
259
+ id: 'unicodeyes',
260
+ class: 'charthbox',
261
+ $on: {
262
+ async click (e) {
263
+ await unicodecharref.unicodeflip(e);
264
+ }
265
+ }
266
+ }],
267
+ _('label_unicodeq')
268
+ ]]
269
+ ]],
270
+ ['div', {class: 'hbox'}, [
271
+ ['label', {class: 'chartLayout'}, [
272
+ ['input', {
273
+ type: 'checkbox',
274
+ id: 'startCharInMiddleOfChart',
275
+ class: 'charthbox',
276
+ $on: {
277
+ async click (e) {
278
+ await unicodecharref.middleflip(e);
279
+ }
280
+ }
281
+ }],
282
+ _('label_middleq')
283
+ ]],
284
+ nbsp.repeat(3),
285
+ ['label', {class: 'chartLayout'}, [
286
+ ['input', {
287
+ type: 'checkbox',
288
+ id: 'buttonyes',
289
+ class: 'charthbox',
290
+ $on: {
291
+ async click (e) {
292
+ await unicodecharref.buttonflip(e);
293
+ }
294
+ }
295
+ }],
296
+ _('label_buttonq')
297
+ ]]
298
+ ]],
299
+ ['div', {class: 'hbox chartLayout'}, [
300
+ ['label', [_('label_fontsize')]],
301
+ nbsp.repeat(2),
302
+ ['button', {class: 'fontsize', $on: {
303
+ click () {
304
+ unicodecharref.tblfontsize(+1);
305
+ }
306
+ }}, [_('plus')]],
307
+ nbsp,
308
+ ['button', {class: 'fontsize', $on: {
309
+ click () {
310
+ unicodecharref.tblfontsize(-1);
311
+ }
312
+ }}, [_('minus')]]
313
+ ]]
314
+ ]],
315
+ ['div', {class: 'vbox'}, [
316
+ ['div', {class: 'hbox chartLayout'}, [
317
+ ['label', [
318
+ _('font_label'),
319
+ nbsp.repeat(2),
320
+ ['input', {
321
+ id: 'font',
322
+ size: '12',
323
+ $custom: {
324
+ $setFontFamily (val) {
325
+ $('#insertText').style.fontFamily = val;
326
+ // Form elements don't inherit, so find these
327
+ // manually
328
+ $$('#chart_table button[name="unicode"]').
329
+ forEach((button) => {
330
+ button.style.fontFamily = val;
331
+ });
332
+ }
333
+ },
334
+ $on: {
335
+ async change (e) {
336
+ await unicodecharref.setprefs(e);
337
+ this.$setFontFamily(this.value);
338
+ }
339
+ }
340
+ }],
341
+ ...fonts.length
342
+ ? [
343
+ ['br'],
344
+ ['select', {id: 'font-list', $on: {
345
+ async change () {
346
+ $('#font').value = this.value;
347
+ await unicodecharref.setprefs({
348
+ target: {
349
+ type: 'select-one',
350
+ id: 'font',
351
+ value: this.value
352
+ }
353
+ });
354
+ $('#font').$setFontFamily(this.value);
355
+ }
356
+ }}, [
357
+ ['option', [
358
+ _('choose_a_font')
359
+ ]],
360
+ // Todo: Set pref to remember
361
+ ...fonts.map((font) => {
362
+ return ['option', [font]];
363
+ })
364
+ ]]
365
+ ]
366
+ : ['']
367
+ ]]
368
+ ]],
369
+ ['div', {
370
+ class: 'hbox',
371
+ title: _('lang_tooltiptext')
372
+ }, [
373
+ ['label', [
374
+ _('lang_label'),
375
+ nbsp.repeat(2),
376
+ ['input', {
377
+ id: 'lang',
378
+ size: '5',
379
+ $on: {
380
+ async change (e) {
381
+ await unicodecharref.setprefs(e);
382
+ $('#chart_table').lang = this.value;
383
+ }
384
+ }
385
+ }]
386
+ ]]
387
+ ]]
388
+ ]]
389
+ ]]
390
+ ]]
391
+ ]]
392
+ ]],
393
+ // ['splitter'],
394
+ ['div', {id: 'chartcontent', class: 'vbox chartBox'}, [
395
+ ['div', {
396
+ id: 'tableholder',
397
+ class: 'vbox'
398
+ }, [
399
+ ['div', {
400
+ id: 'chartContainer'
401
+ }]
402
+ ]],
403
+ // ['splitter']
404
+ ['div', {
405
+ id: 'viewTabs',
406
+ class: 'tabbox viewTabs'
407
+ }, [
408
+ ['div', {class: 'tabs'}],
409
+ ['div', {
410
+ id: 'basicView',
411
+ dataset: {
412
+ selected: true,
413
+ label: _('basicView_tab')
414
+ },
415
+ class: 'tabpanel'
416
+ }, [
417
+ ['div', {class: 'vbox'}, [
418
+ ['div', {class: 'hbox'}, [
419
+ ['label', [
420
+ ['input', {
421
+ id: 'multiline',
422
+ type: 'checkbox',
423
+ $on: {
424
+ click () {
425
+ unicodecharref.multiline();
426
+ }
427
+ }
428
+ }],
429
+ _('button_multiline')
430
+ ]],
431
+ nbsp.repeat(3),
432
+ ['label', [
433
+ ['input', {
434
+ id: 'showImg',
435
+ title: _('ShowImg_tooltiptext'),
436
+ type: 'checkbox',
437
+ $on: {
438
+ async click (e) {
439
+ await unicodecharref.setImagePref(e);
440
+ }
441
+ }
442
+ }],
443
+ _('ShowImg_checkbox_label')
444
+ ]]
445
+ ]],
446
+ ['label', {
447
+ class: 'leftlabel'
448
+ }, [
449
+ _('caption_displayUnicodeDesc'),
450
+ nbsp.repeat(2),
451
+ ['input', {
452
+ id: 'displayUnicodeDesc'
453
+ }]
454
+ ]]
455
+ ]],
456
+ ['div', {id: 'unicodeImg', class: 'hbox'}],
457
+ ['div', {id: 'linksection', class: 'hbox'}, [
458
+ ['div', {id: 'plane'}],
459
+ ' ',
460
+ ['div', {id: 'pdflink', class: 'hbox'}]
461
+ ]],
462
+ ['div', [
463
+ ['fieldset', [
464
+ ['legend', [_('caption_chart_output')]],
465
+ ['div', {class: 'hbox'}, [
466
+ ['label', [
467
+ _('outputtocopy'),
468
+ ['textarea', {
469
+ id: 'insertText'
470
+ }]
471
+ ]],
472
+ ['div', [
473
+ ['button', {id: 'clearoutput', $on: {
474
+ click () {
475
+ $('#insertText').value = '';
476
+ }
477
+ }}, [
478
+ _('button_clearoutput')
479
+ ]]
480
+ ]]
481
+ ]],
482
+ ['div', {id: 'outputButtons', class: 'hbox'}, [
483
+ ['div', {class: 'hbox'}, [
484
+ ['button', {
485
+ tooltiptext: _('willreplaceprecnv'),
486
+ class: 'outputcopybutton',
487
+ $on: {
488
+ click () {
489
+ unicodecharref.moveoutput('#insertText');
490
+ }
491
+ }
492
+ }, [
493
+ _('button_moveoutput')
494
+ ]]
495
+ ]],
496
+ nbsp.repeat(2),
497
+ ['button', {$on: {
498
+ async click () {
499
+ await unicodecharref.copyToClipboard('#insertText');
500
+ }
501
+ }}, [
502
+ _('copyToClipboard')
503
+ ]]
504
+ /*
505
+ ['div', {
506
+ hidden: typeof browser === 'undefined'
507
+ }, [
508
+ nbsp.repeat(2),
509
+ ['button', {$on: {
510
+ click () {
511
+ unicodecharref.addToToolbar();
512
+ }
513
+ }}, [
514
+ _('addToToolbar')
515
+ ]]
516
+ ]]
517
+ */
518
+ ]]
519
+ ]]
520
+ ]]
521
+ ]],
522
+ ['div', {
523
+ id: 'detailedView',
524
+ dataset: {
525
+ label: _('detailedView_tab')
526
+ },
527
+ class: 'tabpanel'
528
+ }, [
529
+ ['div', {id: 'unicodeDescArea', class: 'vbox'}, [
530
+ ['label', [
531
+ ['input', {
532
+ type: 'checkbox',
533
+ id: 'showAllDetailedView',
534
+ $on: {
535
+ async click (e) {
536
+ await unicodecharref.setprefs(e);
537
+ }
538
+ }
539
+ }],
540
+ _('showAllDetailedView_label')
541
+ ]],
542
+ ['div', {
543
+ id: 'displayUnicodeDescContainer',
544
+ class: 'displayUnicodeDescContainer hbox'
545
+ }, [
546
+ ['label', [
547
+ ['h3', [
548
+ _('textbox_displayUnicodeDesc')
549
+ ]],
550
+ ['input', {
551
+ id: 'displayUnicodeDesc2'
552
+ }]
553
+ ]]
554
+ ]]
555
+ ]],
556
+ ['div', {class: 'detailedViewRows vbox'}, [
557
+ ['div', [
558
+ ['div', {
559
+ class: 'detailedViewContainer vbox'
560
+ }, unicodecharref.Unicode.map((key, i) => {
561
+ if (key === 'Unicode_1_Name') {
562
+ return '';
563
+ }
564
+ return ['div', {
565
+ class: 'detailedView vbox'
566
+ }, [
567
+ ['label', {
568
+ class: 'heading'
569
+ }, [
570
+ _(key),
571
+ nbsp.repeat(2),
572
+ [
573
+ key.includes('case_Mapping') ||
574
+ key === 'decompositionMapping' ||
575
+ key === 'numericType'
576
+ ? 'span'
577
+ : 'input',
578
+ {
579
+ id: `_detailedView${i}`
580
+ }
581
+ ]
582
+ ]]
583
+ ]];
584
+ })]
585
+ ]]
586
+ ]]
587
+ ]],
588
+ ['div', {
589
+ id: 'detailedCJKView',
590
+ dataset: {
591
+ label: _('detailedCJKView_tab')
592
+ },
593
+ class: 'tabpanel'
594
+ }, [
595
+ ['div', {id: 'displayUnihanArea', class: 'vbox'}, [
596
+ ['label', [
597
+ ['input', {
598
+ type: 'checkbox',
599
+ id: 'showAllDetailedCJKView',
600
+ $on: {
601
+ async click (e) {
602
+ await unicodecharref.setprefs(e);
603
+ }
604
+ }
605
+ }],
606
+ _('showAllDetailedCJKView_label')
607
+ ]],
608
+ ['div', {class: 'hbox displayUnicodeDescContainer'}, [
609
+ ['label', [
610
+ ['h3', [_('textbox_displayUnicodeDesc')]],
611
+ ['input', {id: 'displayUnicodeDescUnihan'}]
612
+ ]]
613
+ ]],
614
+ ['div', {class: 'detailedCJKViewRows vbox'}, [
615
+ ['div', unicodecharref.Unihan.map((key, num) => {
616
+ if (key === 'kDefinition') {
617
+ return '';
618
+ }
619
+ return ['div', {class: 'detailedCJKView vbox'}, [
620
+ ['label', {class: 'heading'}, [
621
+ _(key),
622
+ nbsp.repeat(2),
623
+ ['input', {
624
+ id: `_detailedCJKView${num}`
625
+ }]
626
+ ]]
627
+ ]];
628
+ })]
629
+ ]]
630
+ ]]
631
+ ]]
632
+ ]]
633
+ ]]
634
+ ]]
635
+ ]],
636
+ ['div', {
637
+ id: 'conversion',
638
+ class: 'tabpanel',
639
+ dataset: {
640
+ label: _('Conversion_tab_label')
641
+ }
642
+ }, [
643
+ ['div', {id: 'conversionhbox', class: 'hbox'}, [
644
+ ['div', {
645
+ id: 'conversion_buttons_persist', class: 'vbox conversionSection'
646
+ }, [
647
+ ['h2', {class: 'dialogheader'}, [
648
+ _('Reconvert_dialogheader_title')
649
+ ]],
650
+ ['button', {id: 'b1', class: 'reconvert', $on: {
651
+ async click (e) {
652
+ await CharrefConverterBridges.charref2unicode(e);
653
+ }
654
+ }}, [_('charref2unicode_label')]],
655
+ ['button', {id: 'b2', class: 'reconvert', $on: {
656
+ async click (e) {
657
+ await CharrefConverterBridges.charref2htmlents(e);
658
+ }
659
+ }}, [_('charref2htmlents_label')]],
660
+ ['button', {id: 'b3', class: 'reconvert', $on: {
661
+ async click (e) {
662
+ await CharrefConverterBridges.unicode2charrefDec(e);
663
+ }
664
+ }}, [_('unicode2charrefDec_label')]],
665
+ ['button', {id: 'b4', class: 'reconvert', $on: {
666
+ async click (e) {
667
+ await CharrefConverterBridges.unicode2charrefHex(e);
668
+ }
669
+ }}, [_('unicode2charrefHex_label')]],
670
+ ['button', {
671
+ id: 'b3b',
672
+ class: 'reconvert',
673
+ title: _('unicode2charrefSurrogate_tooltip'),
674
+ $on: {
675
+ async click (e) {
676
+ await CharrefConverterBridges.unicode2charrefDecSurrogate(e);
677
+ }
678
+ }
679
+ }, [_('unicode2charrefDecSurrogate_label')]],
680
+ ['button', {
681
+ id: 'b4b',
682
+ class: 'reconvert',
683
+ title: _('unicode2charrefSurrogate_tooltip'),
684
+ $on: {
685
+ async click (e) {
686
+ await CharrefConverterBridges.unicode2charrefHexSurrogate(e);
687
+ }
688
+ }
689
+ }, [_('unicode2charrefHexSurrogate_label')]],
690
+ ['button', {id: 'b5', class: 'reconvert', $on: {
691
+ async click (e) {
692
+ await CharrefConverterBridges.unicode2htmlents(e);
693
+ }
694
+ }}, [_('unicode2htmlents_label')]],
695
+ ['div', {class: 'hbox'}, [
696
+ ['button', {id: 'b6', class: 'reconvert', $on: {
697
+ async click (e) {
698
+ await CharrefConverterBridges.unicode2jsescape(e);
699
+ }
700
+ }}, [_('unicode2JSEscape_label')]],
701
+ ['button', {id: 'b7', class: 'reconvert', $on: {
702
+ async click (e) {
703
+ await CharrefConverterBridges.unicodeTo6Digit(e);
704
+ }
705
+ }}, [_('unicodeTo6Digit_label')]]
706
+ ]],
707
+ ['button', {id: 'b8', class: 'reconvert', $on: {
708
+ async click (e) {
709
+ await CharrefConverterBridges.unicode2cssescape(e);
710
+ }
711
+ }}, [_('unicode2CSSEscape_label')]],
712
+ ['button', {id: 'b9', class: 'reconvert', $on: {
713
+ async click (e) {
714
+ await CharrefConverterBridges.htmlents2charrefDec(e);
715
+ }
716
+ }}, [_('htmlents2charrefDec_label')]],
717
+ ['button', {id: 'b10', class: 'reconvert', $on: {
718
+ async click (e) {
719
+ await CharrefConverterBridges.htmlents2charrefHex(e);
720
+ }
721
+ }}, [_('htmlents2charrefHex_label')]],
722
+ ['button', {id: 'b11', class: 'reconvert', $on: {
723
+ async click (e) {
724
+ await CharrefConverterBridges.htmlents2unicode(e);
725
+ }
726
+ }}, [_('htmlents2unicode_label')]],
727
+ ['button', {id: 'b12', class: 'reconvert', $on: {
728
+ async click (e) {
729
+ await CharrefConverterBridges.hex2dec(e);
730
+ }
731
+ }}, [_('hex2dec_label')]],
732
+ ['button', {id: 'b13', class: 'reconvert', $on: {
733
+ async click (e) {
734
+ await CharrefConverterBridges.dec2hex(e);
735
+ }
736
+ }}, [_('dec2hex_label')]],
737
+ ['div', {class: 'hbox'}, [
738
+ ['button', {id: 'b14', class: 'reconvert', $on: {
739
+ click (e) {
740
+ CharrefConverterBridges.jsescape2unicode(e);
741
+ }
742
+ }}, [_('jsescape2unicode_label')]],
743
+ ['button', {id: 'b15', class: 'reconvert', $on: {
744
+ click (e) {
745
+ CharrefConverterBridges.sixDigit2Unicode(e);
746
+ }
747
+ }}, [_('sixDigit2unicode_label')]]
748
+ ]],
749
+ ['button', {id: 'b16', class: 'reconvert', $on: {
750
+ click (e) {
751
+ CharrefConverterBridges.cssescape2unicode(e);
752
+ }
753
+ }}, [_('cssescape2unicode_label')]],
754
+ ['div', {class: 'hbox'}, [
755
+ ['button', {id: 'b17', class: 'reconvert', $on: {
756
+ async click (e) {
757
+ await CharrefConverterBridges.unicode2CharDesc(e);
758
+ }
759
+ }}, [_('unicode2CharDesc_label')]],
760
+ ['button', {id: 'b18', class: 'reconvert', $on: {
761
+ async click (e) {
762
+ await CharrefConverterBridges.charDesc2Unicode(e);
763
+ }
764
+ }}, [_('charDesc2Unicode_label')]]
765
+ ]]
766
+ /*
767
+ ['fieldset', {id: 'convertEncoding'}, [
768
+ ['div', {id: 'convertFromEncoding'}, [
769
+ ['label', [
770
+ _('Convert_From_Encoding'),
771
+ nbsp.repeat(2),
772
+ // Todo: Set pref to remember
773
+ ['select', {
774
+ id: 'encoding_from',
775
+ class: 'reconvert',
776
+ multiple: 'multiple'
777
+ }, encodings.map((option) => {
778
+ return ['option', [option]];
779
+ })]
780
+ ]]
781
+ ]],
782
+ ['label', [
783
+ _('Convert_To_Encoding'),
784
+ nbsp.repeat(2),
785
+ // Todo: Set pref to remember
786
+ ['select', {
787
+ id: 'encoding_to',
788
+ class: 'reconvert',
789
+ multiple: 'multiple'
790
+ }, encodings.map((option) => {
791
+ return ['option', [option]];
792
+ })]
793
+ ]]
794
+ ]]
795
+ */
796
+ ]],
797
+ // ['splitter'],
798
+ ['div', {id: 'toconvert_persist', class: 'vbox conversionSection'}, [
799
+ // ['h2', {class: 'dialogheader'}, [ _ ('uresults_value') ]],
800
+ ['label', {id: 'toconvert_persist_label'}, [
801
+ _('uresults_preconverted'),
802
+ ['div', [
803
+ ['textarea', {
804
+ id: 'toconvert',
805
+ placeholder: _('toconvert_placeholder'),
806
+ class: 'convertBox'
807
+ }]
808
+ ]]
809
+ ]],
810
+ // ['splitter'],
811
+ ['label', [
812
+ _('uresults_converted'),
813
+ ['div', [
814
+ ['textarea', {
815
+ id: 'converted',
816
+ class: 'convertBox',
817
+ placeholder: _('converted_value_placeholder')
818
+ }]
819
+ ]]
820
+ ]],
821
+ ['div', {class: 'hbox'}, [
822
+ _('label_fontsize'),
823
+ nbsp.repeat(2),
824
+ ['button', {class: 'fontsize', $on: {
825
+ click () {
826
+ unicodecharref.fontsizetextbox(+1);
827
+ }
828
+ }}, [
829
+ _('plus')
830
+ ]],
831
+ nbsp,
832
+ ['button', {class: 'fontsize', $on: {
833
+ click () {
834
+ unicodecharref.fontsizetextbox(-1);
835
+ }
836
+ }}, [
837
+ _('minus')
838
+ ]],
839
+ nbsp.repeat(7),
840
+ ['button', {id: 'moveconvertedup', $on: {click () {
841
+ unicodecharref.moveoutput('#converted');
842
+ }}}, [
843
+ _('moveconvertedup_label')
844
+ ]]
845
+ ]]
846
+ ]]
847
+ ]]
848
+ ]],
849
+ ['div', {
850
+ id: 'prefs',
851
+ class: 'tabpanel vbox',
852
+ dataset: {
853
+ label: _('Prefs_tab_label')
854
+ }
855
+ }, [
856
+ ['h2', {class: 'dialogheader'}, [_('Preferences_dialogheader_title')]],
857
+ ['div', {
858
+ id: 'DownloadButtonBox',
859
+ class: 'bottomboxed vbox',
860
+ title: _('Download_unihan_tooltip')
861
+ }, [
862
+ ['div', [
863
+ ['button', {
864
+ $on: {
865
+ async click () {
866
+ await unicodecharref.downloadUnihan();
867
+ }
868
+ }
869
+ }, [_('DownloadUnihan')]]
870
+ ]]
871
+ ]],
872
+ ['div', {
873
+ id: 'DownloadProgressBox',
874
+ class: 'vbox',
875
+ hidden: true
876
+ }, [
877
+ ['label', [
878
+ ['progressmeter', {id: 'progress_element'}]
879
+ ]],
880
+ ['button', {
881
+ id: 'closeDownloadProgressBox',
882
+ hidden: true,
883
+ $on: {
884
+ click () {
885
+ unicodecharref.closeDownloadProgressBox();
886
+ }
887
+ }
888
+ }, [_('Close')]]
889
+ ]],
890
+ ['div', {id: 'UnihanInstalled', hidden: true, class: 'vbox'}, [
891
+ _('UnihanInstalled')
892
+ ]],
893
+ ['div', [
894
+ ['button', {id: 'registerProtocolHandler', $on: {
895
+ click () {
896
+ const url = new URL(location.href);
897
+ navigator.registerProtocolHandler(
898
+ 'web+unicode',
899
+ url.protocol + '://' + url.host + url.pathname + '?customProtocol=%s',
900
+ // Deprecated title arg but required for some browsers
901
+ 'Unicode'
902
+ );
903
+ }
904
+ }}, [
905
+ _('Register_protocol_handler')
906
+ ]]
907
+ ]],
908
+ ['div', {class: 'boxed vbox'}, [
909
+ ['label', [
910
+ _('initialTab_label'), nbsp.repeat(3),
911
+ ['select', {id: 'initialTab', $on: {
912
+ async change (e) {
913
+ await unicodecharref.setprefs(e);
914
+ }
915
+ }}, [
916
+ ['option', {
917
+ id: 'mi_charts', value: 'charts'
918
+ }, [_('Charts_tab_label')]],
919
+ ['option', {
920
+ id: 'mi_conversion', value: 'conversion'
921
+ }, [_('Conversion_tab_label')]],
922
+ ['option', {
923
+ id: 'mi_prefs', value: 'prefs'
924
+ }, [_('Prefs_tab_label')]],
925
+ ['option', {
926
+ id: 'mi_DTDpanel', value: 'DTDpanel'
927
+ }, [_('DTD_tab_label')]],
928
+ ['option', {
929
+ id: 'mi_notes', value: 'notes'
930
+ }, [_('Notes_tab_label')]],
931
+ ['option', {
932
+ id: 'mi_about', value: 'about'
933
+ }, [_('About_tab_label')]]
934
+ ]]
935
+ ]]
936
+ ]],
937
+ ['div', {class: 'boxedbottom vbox'}, [
938
+ ['label', [
939
+ ['input', {
940
+ type: 'checkbox',
941
+ id: 'hexLettersUpper',
942
+ class: 'topofpanel',
943
+ $on: {
944
+ async click (e) {
945
+ await unicodecharref.hexLettersCasing(e);
946
+ }
947
+ }
948
+ }],
949
+ _('Hexletters_checkbox_label')
950
+ ]]
951
+ ]],
952
+ ['div', {class: 'boxedbottom vbox'}, [
953
+ ['label', [
954
+ ['input', {
955
+ type: 'checkbox',
956
+ id: 'asciiLt128',
957
+ $on: {
958
+ async click (e) {
959
+ await unicodecharref.setprefs(e);
960
+ }
961
+ }
962
+ }],
963
+ _('Ascii_checkbox_label')
964
+ ]]
965
+ ]],
966
+ ['div', {class: 'boxedbottom vbox'}, [
967
+ ['label', [
968
+ ['input', {
969
+ type: 'checkbox',
970
+ id: 'xhtmlentmode',
971
+ class: 'topofpanel',
972
+ $on: {
973
+ async click (e) {
974
+ await unicodecharref.setprefs(e);
975
+ }
976
+ }
977
+ }],
978
+ _('xhtmlentmode_label')
979
+ ]]
980
+ ]],
981
+ ['div', {class: 'boxedbottom vbox'}, [
982
+ ['label', [
983
+ ['input', {
984
+ type: 'checkbox',
985
+ id: 'xmlentkeep',
986
+ class: 'topofpanel',
987
+ $on: {
988
+ async click (e) {
989
+ await unicodecharref.setprefs(e);
990
+ }
991
+ }
992
+ }],
993
+ _('xmlentmode_label')
994
+ ]]
995
+ ]],
996
+ ['div', {class: 'boxedbottom vbox'}, [
997
+ ['label', [
998
+ ['input', {
999
+ type: 'checkbox',
1000
+ id: 'ampkeep',
1001
+ class: 'topofpanel',
1002
+ $on: {
1003
+ async click (e) {
1004
+ await unicodecharref.setprefs(e);
1005
+ }
1006
+ }
1007
+ }],
1008
+ _('ampkeep_label')
1009
+ ]]
1010
+ ]],
1011
+ ['div', {class: 'boxedbottom vbox'}, [
1012
+ ['label', [
1013
+ ['input', {
1014
+ type: 'checkbox',
1015
+ id: 'ampspace',
1016
+ class: 'topofpanel',
1017
+ $on: {
1018
+ async click (e) {
1019
+ await unicodecharref.setprefs(e);
1020
+ }
1021
+ }
1022
+ }],
1023
+ _('ampspace_label')
1024
+ ]]
1025
+ ]],
1026
+ /*
1027
+ ['div', {class: 'boxedbottom vbox'}, [
1028
+ ['label', [
1029
+ ['input', {
1030
+ type: 'checkbox',
1031
+ id: 'showComplexWindow',
1032
+ class: 'topofpanel',
1033
+ $on: {
1034
+ async click (e) {
1035
+ await unicodecharref.setprefs(e);
1036
+ await unicodecharref.testIfComplexWindow();
1037
+ }
1038
+ }
1039
+ }],
1040
+ _('showComplexWindow_label')
1041
+ ]]
1042
+ ]],
1043
+ */
1044
+ ['div', {class: 'boxedbottom vbox'}, [
1045
+ ['label', [
1046
+ ['input', {
1047
+ type: 'checkbox',
1048
+ id: 'cssUnambiguous',
1049
+ class: 'topofpanel',
1050
+ $on: {
1051
+ async click (e) {
1052
+ await unicodecharref.setprefs(e);
1053
+ }
1054
+ }
1055
+ }],
1056
+ _('cssUnambiguous_label')
1057
+ ]],
1058
+ ['br'],
1059
+ ['label', [
1060
+ _('CSSWhitespace_label'), nbsp.repeat(3),
1061
+ ['select', {
1062
+ id: 'CSSWhitespace',
1063
+ $on: {
1064
+ async change (e) {
1065
+ await unicodecharref.cssWhitespace(e);
1066
+ }
1067
+ }
1068
+ }, [
1069
+ ['option', {value: 'space'}, [_('CSS_space')]],
1070
+ /*
1071
+ ['option', {value: 'rn'}, [_('CSS_rn')]],
1072
+ ['option', {value: 'r'}, [_('CSS_r')]],
1073
+ */
1074
+ ['option', {value: 'n'}, [_('CSS_n')]],
1075
+ ['option', {value: 't'}, [_('CSS_t')]],
1076
+ ['option', {value: 'f'}, [_('CSS_f')]]
1077
+ ]]
1078
+ ]]
1079
+ ]],
1080
+ ['div', {style: 'text-align: center;'}, [
1081
+ ['button', {id: 'resetdefaultbutton', $on: {
1082
+ click () {
1083
+ unicodecharref.resetdefaults();
1084
+ }
1085
+ }}, [
1086
+ _('resettodefault_label')
1087
+ ]]
1088
+ ]]
1089
+ ]],
1090
+ ['div', {
1091
+ id: 'DTDpanel',
1092
+ class: 'tabpanel vbox',
1093
+ dataset: {
1094
+ label: _('DTD_tab_label')
1095
+ }
1096
+ }, [
1097
+ ['h2', {class: 'dialogheader'}, [
1098
+ _('dialogheader_value')
1099
+ ]],
1100
+ ...fill(2).map((__, i) => {
1101
+ return ['p', [
1102
+ _(`DTD_desc_value${i + 1}`)
1103
+ ]];
1104
+ }),
1105
+ ['div', {class: 'hbox'}, [
1106
+ ['textarea', {id: 'DTDtextbox', $on: {
1107
+ async change () {
1108
+ await registerDTD();
1109
+ await unicodecharref.chartBuildResize();
1110
+ }
1111
+ }}, [
1112
+ _('DTD_textbox_value')
1113
+ ]],
1114
+ ['div', {class: 'vbox'}, [
1115
+ ['div', {class: 'hbox'}, [
1116
+ ['label', [
1117
+ _('DTD_insertEntityFile'), nbsp.repeat(2),
1118
+ ['select', {
1119
+ id: 'insertEntityFile',
1120
+ class: 'dtdbutton'
1121
+ }, [
1122
+ ['option', {value: ''}, [
1123
+ _('choose_an_entity_file')
1124
+ ]],
1125
+ ['optgroup', {label: 'Recommended (Non-legacy)'}, [
1126
+ ['option', {
1127
+ value: 'htmlmathml-f'
1128
+ }, [_('ent_htmlmathml_f')]],
1129
+ ['option', {
1130
+ value: 'w3centities-f'
1131
+ }, [_('ent_w3centities_f')]]
1132
+ ]],
1133
+ ['optgroup', {label: 'Graphic'}, [
1134
+ ['option', {value: 'isobox'}, [_('ent_isobox')]],
1135
+ ['option', {value: 'isonum'}, [_('ent_isonum')]]
1136
+ ]],
1137
+ ['optgroup', {label: 'Math Symbols'}, [
1138
+ ['option', {
1139
+ value: 'xhtml1-symbol'
1140
+ }, [_('ent_xhtml1_symbol')]],
1141
+ ['option', {value: 'isoamsa'}, [_('ent_isoamsa')]],
1142
+ ['option', {value: 'isoamsb'}, [_('ent_isoamsb')]],
1143
+ ['option', {value: 'isoamsc'}, [_('ent_isoamsc')]],
1144
+ ['option', {value: 'isoamsn'}, [_('ent_isoamsn')]],
1145
+ ['option', {value: 'isoamso'}, [_('ent_isoamso')]],
1146
+ ['option', {value: 'isoamsr'}, [_('ent_isoamsr')]]
1147
+ ]],
1148
+ ['optgroup', {label: 'Math Alphabets'}, [
1149
+ ['option', {value: 'isomfrk'}, [_('ent_isomfrk')]],
1150
+ ['option', {value: 'isomopf'}, [_('ent_isomopf')]],
1151
+ ['option', {value: 'isomscr'}, [_('ent_isomscr')]]
1152
+ ]],
1153
+ ['optgroup', {label: 'MathML'}, [
1154
+ ['option', {value: 'mmlextra'}, [_('ent_mmlextra')]],
1155
+ ['option', {value: 'mmlalias'}, [_('ent_mmlalias')]]
1156
+ ]],
1157
+ ['optgroup', {label: 'Cyrillic'}, [
1158
+ ['option', {value: 'isocyr1'}, [_('ent_isocyr1')]],
1159
+ ['option', {value: 'isocyr2'}, [_('ent_isocyr2')]]
1160
+ ]],
1161
+ ['optgroup', {label: 'Greek'}, [
1162
+ ['option', {value: 'isogrk1'}, [_('ent_isogrk1')]],
1163
+ ['option', {value: 'isogrk2'}, [_('ent_isogrk2')]],
1164
+ ['option', {value: 'isogrk3'}, [_('ent_isogrk3')]],
1165
+ ['option', {value: 'isogrk4'}, [_('ent_isogrk4')]]
1166
+ ]],
1167
+ ['optgroup', {label: 'Latin'}, [
1168
+ ['option', {value: 'isolat1'}, [_('ent_isolat1')]],
1169
+ ['option', {value: 'isolat2'}, [_('ent_isolat2')]],
1170
+ ['option', {value: 'xhtml1-lat1'}, [_('ent_xhtml1_lat1')]]
1171
+ ]],
1172
+ ['optgroup', {label: 'XHTML/HTML/XML'}, [
1173
+ ['option', {value: 'xhtml1-lat1'}, [_('ent_xhtml1_lat1')]],
1174
+ ['option', {
1175
+ value: 'xhtml1-special'
1176
+ }, [_('ent_xhtml1_special')]],
1177
+ ['option', {
1178
+ value: 'xhtml1-symbol'
1179
+ }, [_('ent_xhtml1_symbol')]],
1180
+ ['option', {
1181
+ value: 'html5-uppercase'
1182
+ }, [_('ent_html5_uppercase')]],
1183
+ ['option', {value: 'predefined'}, [_('ent_predefined')]]
1184
+ ]],
1185
+ ['optgroup', {label: 'Other'}, [
1186
+ ['option', {value: 'isodia'}, [_('ent_isodia')]],
1187
+ ['option', {value: 'isopub'}, [_('ent_isopub')]],
1188
+ ['option', {value: 'isotech'}, [_('ent_isotech')]]
1189
+ ]]
1190
+ ]]
1191
+ ]]
1192
+ ]],
1193
+ ['div', {style: 'text-align: center; margin-top: 10px;'}, [
1194
+ ['button', {class: 'dtdbutton', $on: {click () {
1195
+ unicodecharref.insertent('DTDtextbox');
1196
+ }}}, [
1197
+ _('DTD_insertent')
1198
+ ]]
1199
+ ]],
1200
+ ['label', {style: 'margin-top: 10px;'}, [
1201
+ ['input', {
1202
+ id: 'appendtohtmldtd',
1203
+ type: 'checkbox',
1204
+ $on: {
1205
+ async click (e) {
1206
+ await unicodecharref.append2htmlflip(e);
1207
+ }
1208
+ }
1209
+ }],
1210
+ _('appendhtml_checkbox')
1211
+ ]]
1212
+ ]]
1213
+ ]]
1214
+ ]],
1215
+ ['div', {
1216
+ id: 'notes',
1217
+ class: 'tabpanel vbox',
1218
+ dataset: {
1219
+ label: _('Notes_tab_label')
1220
+ }
1221
+ }, [
1222
+ ['h2', {class: 'dialogheader'}, [_('Notes_dialogheader_title')]],
1223
+ ['div', {class: 'hbox'}, [
1224
+ ['div', {class: 'noteDescriptionBox vbox'}, [
1225
+ ['h3', [_('note_heading')]],
1226
+ ...fill(8).map((__, i) => {
1227
+ return ['div', {class: 'notesdescription'}, [
1228
+ _(`notespar${i + 1}`)
1229
+ ]];
1230
+ })
1231
+ ]],
1232
+ ['div', {class: 'noteDescriptionBox vbox'}, [
1233
+ ['h3', [_('usage_note_heading')]],
1234
+ ...fill(13).map((__, i) => {
1235
+ return ['div', {class: 'usage_notesdescription'}, [
1236
+ _(`usage_notespar${i + 1}`)
1237
+ ]];
1238
+ })
1239
+ ]]
1240
+ ]]
1241
+ ]],
1242
+ ['div', {
1243
+ id: 'about',
1244
+ class: 'tabpanel vbox',
1245
+ dataset: {
1246
+ label: _('About_tab_label')
1247
+ }
1248
+ }, [
1249
+ ['h2', {class: 'dialogheader'}, [_('About_dialogheader_title')]],
1250
+ ['section', [
1251
+ ['p', {class: 'aboutdescription'}, [
1252
+ _('About_developer_and_contributors', {
1253
+ About_developer: _('About_developer'),
1254
+ About_contributors: _('About_contributors'),
1255
+ About_developer_link: jml('a', {
1256
+ href: 'mailto:brett@brett-zamir.name',
1257
+ target: '_top'
1258
+ }, [
1259
+ _('About_developer_linkText')
1260
+ ])
1261
+ })
1262
+ ]],
1263
+ ['p', {class: 'aboutdescription'}, [
1264
+ _('About_donation', {
1265
+ About_donation_button: jml('button', {
1266
+ id: 'donationbutton'
1267
+ }, [
1268
+ _('About_donation_buttonText')
1269
+ ])
1270
+ })
1271
+ ]],
1272
+ ['p', {class: 'aboutdescription'}, [
1273
+ _('About_ial', {
1274
+ About_ial_wikipedia_link: jml('a', {
1275
+ class: 'text-link',
1276
+ target: '_blank',
1277
+ href: safeLink(_('About_ial_wikipedia_linkURL'))
1278
+ }, [
1279
+ _('About_ial_wikipedia_linkText')
1280
+ ]),
1281
+ About_ial_onetongue_link: jml('a', {
1282
+ class: 'text-link',
1283
+ target: '_blank',
1284
+ href: 'http://onetongue.com'
1285
+ }, [
1286
+ _('About_ial_onetongue_linkText')
1287
+ ])
1288
+ })
1289
+ ]]
1290
+ ]]
1291
+ ]]
1292
+ ]]
1293
+ ], body);
1294
+
1295
+ // See why intl-dom not apparently keeping event handlers
1296
+ $('#donationbutton').addEventListener('click', () => {
1297
+ window.open(
1298
+ 'https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=brettz9%40yahoo%2ecom&no_shipping=0&no_note=1&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8',
1299
+ 'bzamirdonation'
1300
+ );
1301
+ });
1302
+ };
1303
+
1304
+ export default indexTemplate;