aboutsummaryrefslogtreecommitdiff
path: root/ext/settings.html
blob: 14342a5b5fcd1bcf444f002f6a7f9f601d4d030b (plain)
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
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
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
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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
<!DOCTYPE html>
<html lang="en" data-browser="unknown" data-os="unknown" data-manifest-version="unknown">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Yomitan Settings</title>
    <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
    <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
    <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
    <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
    <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
    <link rel="stylesheet" type="text/css" href="/css/material.css">
    <link rel="stylesheet" type="text/css" href="/css/settings.css">
    <link rel="stylesheet" type="text/css" href="/css/display-pronunciation.css">
    <script src="/js/pages/settings/settings-main.js" type="module"></script>
</head>
<body>

<!-- Main content -->
<div class="content-outer"><div class="content">
<div class="content-left">
    <div class="sidebar"><div class="sidebar-inner">
        <div class="sidebar-body">
            <a href="#!profile"          class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="profile"></span></span><span class="outline-item-label">Profile</span></a>
            <a href="#!dictionaries"     class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="book"></span><span class="outline-item-left-warning-badge no-dictionaries-enabled-warning" hidden><div class="badge warning-badge"><span class="icon" data-icon="exclamation-point-short"></span></div></span></span><span class="outline-item-label">Dictionaries</span></a>
            <a href="#!general"          class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="cog"></span></span><span class="outline-item-label">General</span></a>
            <a href="#!scanning"         class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="scanning"></span></span><span class="outline-item-label">Scanning</span></a>
            <a href="#!popup"            class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="popup"></span></span><span class="outline-item-label">Popup Behavior</span></a>
            <a href="#!appearance"       class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="palette"></span></span><span class="outline-item-label">Appearance</span></a>
            <a href="#!result-display"   class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="monitor"></span></span><span class="outline-item-label">Result Display</span></a>
            <a href="#!popup-size"       class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="popup-size"></span></span><span class="outline-item-label">Position &amp; Size</span></a>
            <a href="#!window"           class="button outline-item advanced-only"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="window"></span></span><span class="outline-item-label">Window</span></a>
            <a href="#!audio"            class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="speaker"></span></span><span class="outline-item-label">Audio</span></a>
            <a href="#!text-parsing"     class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="text-parsing"></span></span><span class="outline-item-label">Text Parsing</span></a>
            <a href="#!translation"      class="button outline-item advanced-only"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="translation"></span></span><span class="outline-item-label">Translation</span></a>
            <a href="#!anki"             class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="note-card"></span></span><span class="outline-item-label">Anki</span></a>
            <a href="#!clipboard"        class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="clipboard"></span></span><span class="outline-item-label">Clipboard</span></a>
            <a href="#!shortcuts"        class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="keyboard"></span></span><span class="outline-item-label">Shortcuts</span></a>
            <a href="#!backup"           class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="backup"></span></span><span class="outline-item-label">Backup</span></a>
            <a href="#!accessibility"    class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="accessibility"></span></span><span class="outline-item-label">Accessibility</span></a>
            <a href="#!security"         class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="lock"></span></span><span class="outline-item-label">Security</span></a>
        </div>
        <div class="sidebar-bottom">
            <label class="button outline-item"><span class="outline-item-left">
                <label class="toggle advanced-toggle"><input id="advanced-checkbox" type="checkbox" data-setting="general.showAdvanced"
                    data-transform='{
                        "type": "setAttribute",
                        "selector": ":root",
                        "attribute": "data-advanced"
                    }'
                ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </span><span class="outline-item-label">Advanced</span></label>
            <a href="/info.html" class="button outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="question-mark"></span></span><span class="outline-item-label">About Yomitan</span></a>
        </div>
    </div></div>
</div>
<div class="content-center">

    <span tabindex="-1" id="content-scroll-focus"></span>

    <h1>Yomitan Settings</h1>

    <!-- Notifications -->
    <div class="settings-group settings-group-top-margin page-loading-stalled-notification">
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    <p>
                        This page is taking longer than expected to load.
                    </p>
                    <p data-show-for-browser="safari">
                        Due to a bug in Safari, it may be necessary to click the <img src="/images/yomitan-icon.svg" class="inline-icon" alt=""> <em>Yomitan</em>
                        button in the browser bar to fully load the page
                    </p>
                </div>
            </div>
        </div></div>
    </div>

    <!-- Profile -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="profile"></span></div>
        <div class="heading-container-left"><h2 id="profile"><a href="#!profile">Profile</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Default profile</div>
                <div class="settings-item-description">Switch the primary profile that is used for scanning.</div>
            </div>
            <div class="settings-item-right">
                <select id="profile-active-select"></select>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Editing profile</div>
                <div class="settings-item-description">Change which profile is being modified on this page.</div>
            </div>
            <div class="settings-item-right">
                <select id="profile-target-select"></select>
            </div>
        </div></div>
        <div class="settings-item settings-item-button" data-modal-action="show,profiles"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure profiles&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
    </div>

        <!-- General -->
        <div class="heading-container">
            <div class="heading-container-icon"><span class="icon" data-icon="cog"></span></div>
            <div class="heading-container-left"><h2 id="general"><a href="#!general">General</a></h2></div>
        </div>
        <div class="settings-group">
            <div class="settings-item"><div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Enable Yomitan</div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="general.enable"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div></div>
            <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Language
                    </div>
                    <div class="settings-item-description">
                        Language of the text that is being looked up.
                    </div>
                </div>
                <div class="settings-item-right">
                    <select id="language-select" data-setting="general.language"></select>
                </div>
            </div></div>
            <div class="settings-item"><div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Show the <a href="/welcome.html" target="_blank" rel="noopener">welcome guide</a> on browser startup</div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="general.showGuide"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div></div>
            <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Maximum number of results</div>
                    <div class="settings-item-description">Adjust the maximum number of results shown for lookups.</div>
                </div>
                <div class="settings-item-right">
                    <input type="number" min="1" data-setting="general.maxResults">
                </div>
            </div></div>
        </div>

    <!-- Dictionaries -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="book"></span></div>
        <div class="heading-container-left"><h2 id="dictionaries"><a href="#!dictionaries">Dictionaries</a> <span class="heading-sub-text no-wrap" data-modal-action="show,dictionaries">(<span id="dictionary-install-count">#</span> installed, <span id="dictionary-enabled-count">#</span> enabled)</span></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item settings-item-button" data-modal-action="show,dictionaries"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    <div class="flex-row-nowrap">
                        <div>Configure installed and enabled dictionaries&hellip;</div>
                        <div class="flex-margin-left badge warning-badge no-dictionaries-enabled-warning" hidden><span class="icon" data-icon="exclamation-point-short"></span></div>
                    </div>
                </div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Storage</div>
                    <div class="settings-item-description">
                        <span class="storage-use-invalid">
                            Yomitan is using an indeterminate amount of storage.
                        </span>
                        <span class="storage-use-finite" hidden>
                            Yomitan is using approximately <span class="storage-usage">?</span> of <span class="storage-quota">?</span>.
                            <div class="storage-exhaustion-alert warning-text margin-above">
                                <div>
                                    <strong>Your system is running low on storage space.</strong><br>
                                    Importing dictionaries may fail.
                                </div>
                            </div>
                        </span>
                        <span class="storage-use-infinite" hidden>
                            Yomitan is permitted unlimited storage.
                        </span>
                    </div>
                </div>
                <div class="settings-item-right">
                    <button type="button" id="storage-refresh" class="low-emphasis">Refresh</button>
                </div>
            </div>
        </div>
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Frequency sorting dictionary</div>
                    <div class="settings-item-description">
                        Sort results using a frequency dictionary.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <select id="sort-frequency-dictionary"></select>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Enabling this option will sort search results using a specific dictionary.
                    This can be beneficial when using multiple dictionaries which may not have
                    consistent sorting information.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
            <div class="settings-item-children settings-item-children-group advanced-only" id="sort-frequency-dictionary-order-container" hidden>
                <div class="settings-item">
                    <div class="settings-item-inner settings-item-inner-wrappable">
                        <div class="settings-item-left">
                            <div class="settings-item-label">
                                Frequency sorting mode
                                <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                            </div>
                        </div>
                        <div class="settings-item-right">
                            <div class="horizontal-flex horizontal-flex-nowrap">
                                <button type="button" class="low-emphasis" id="sort-frequency-dictionary-order-auto">Auto</button>
                                <select id="sort-frequency-dictionary-order">
                                    <option value="descending">Occurrence-based</option>
                                    <option value="ascending">Rank-based</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="settings-item-children more" hidden>
                        <p>
                            Dictionary frequency data can be represented in one of two ways:
                        </p>
                        <ul>
                            <li>
                                <em>Occurrence-based</em>, where the frequency corresponds to a number of occurrences.
                                Large values indicate a more common term.
                            </li>
                            <li>
                                <em>Rank-based</em>, where the frequency value corresponds to a ranking index.
                                Smaller values indicate a more common term.
                            </li>
                        </ul>
                        <p>
                            The correct mode can be determined based on the contents of the dictionary;
                            the <em>Auto</em> button attempts to auto-detect the correct value.
                        </p>
                        <p>
                            <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                        </p>
                    </div>
                </div>
            </div>
        </div>
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Persistent storage</div>
                    <div class="settings-item-description">
                        Enable to help prevent the browser from unexpectedly clearing the database.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" id="storage-persistent-checkbox"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Web browsers will sometimes clear stored data if the device is running low on storage space.
                    This can result in the imported dictionaries being deleted unexpectedly, causing Yomitan to stop functioning.
                    Enabling persistent storage tells the browser that the data should not be deleted in those circumstances.
                </p>
                <p data-show-for-browser="firefox firefox-mobile" class="storage-use-invalid" hidden>
                    On Firefox and Firefox for Android, the storage information feature may be hidden behind a browser flag.

                    To enable this flag, open <a href="about:config" target="_blank" rel="noopener">about:config</a> and search for
                    <strong>dom.storageManager.enabled</strong>.

                    Setting its value to <strong>true</strong> should allow storage information to be calculated.
                </p>
                <p data-show-for-browser="firefox-mobile">
                    It may not be possible to enable Persistent Storage on Firefox for Android.
                </p>
                <p data-show-for-browser="chrome edge">
                    Chromium-based browsers should not need to enable this setting since the Yomitan extension has
                    the <code>unlimitedStorage</code> permission, which should prevent data deletion.<sup><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=680392#c15" target="_blank" rel="noopener">[1]</a></sup>
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
    </div>

    <!-- Scanning -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="scanning"></span></div>
        <div class="heading-container-left"><h2 id="scanning"><a href="#!scanning">Scanning</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Scan modifier key</div>
                    <div class="settings-item-description">
                        Hold a key while moving the cursor to scan text.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <select id="main-scan-modifier-key"></select>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    A keyboard modifier key can be used to activate text scanning when the cursor is moved.
                    Alternatively, the <em>No key</em> option can be used to scan text whenever the cursor is moved,
                    without requiring any key to be held.
                </p>
                <p>
                    More advanced scanning input customization can be set up by enabling the <em>Advanced</em> option
                    and clicking <em data-modal-action="show,scanning-inputs">Configure advanced scanning inputs</em>.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Scan using middle mouse button</div>
                <div class="settings-item-description">Hold the middle mouse button while moving the cursor to scan text.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" id="middle-mouse-button-scan"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item settings-item-button advanced-only" data-modal-action="show,scanning-inputs"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure advanced scanning inputs&hellip; <span class="light no-wrap">(<span class="scanning-input-count">#</span> defined)</span></div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Scan delay <span class="light">(in milliseconds)</span></div>
                <div class="settings-item-description">Change the delay before scanning occurs when no modifier key is required.</div>
            </div>
            <div class="settings-item-right">
                <input type="number" data-setting="scanning.delay" min="0">
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Select matched text</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="scanning.selectText"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Search text with non-Japanese characters</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="scanning.alphanumeric"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Layout-aware scanning</div>
                <div class="settings-item-description">Use webpage styling information to determine where line breaks are likely to be.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="scanning.layoutAwareScan"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Deep content scanning</div>
                <div class="settings-item-description">Enable scanning text that is covered by other layers.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="scanning.deepDomScan"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Normalize CSS zoom</div>
                    <div class="settings-item-description">
                        Correct the pointer location on webpages where CSS <code>zoom</code> is used.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="scanning.normalizeCssZoom"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    The non-standard CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/zoom" target="_blank" rel="noopener noreferrer"><code>zoom</code></a> property interferes with the normal calculation of the pointer coordinates when scanning webpages. This property is discouraged from being used and its use is rare, but some webpages may still use it.
                </p>
                <p>
                    Enabling this option, which is on by default, will take the value of this property into account when scanning webpage content. It is currently put behind an option in case there are unforeseen negative side effects.
                </p>
                <p>
                    This setting does not have any effect in Firefox, as it does not implement the <code>zoom</code> property.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Wildcard scanning</div>
                    <div class="settings-item-description">
                        Enable suffix wildcard when looking up scanned webpage text.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="scanning.matchTypePrefix"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Rather than searching for the source text exactly, the text will only be required to be a prefix of an existing term.
                    For example, scanning 読み will effectively search for 読み*, which may bring up additional results such as 読み方.
                </p>
                <p class="danger-text">
                    This will likely cause scanning and lookup to be slower, and the results may not be as relevant.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Text scan length</div>
                <div class="settings-item-description">Change how many characters are read when scanning for terms.</div>
                <div class="warning-text margin-above">
                    <strong>Setting this value too high (100+) may impact performance.</strong>
                </div>
            </div>
            <div class="settings-item-right">
                <input type="number" data-setting="scanning.length" min="1" step="1">
            </div>
        </div></div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Support inputs for devices with touch screens
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right flex-row-wrap">
                    <div class="settings-item-group settings-item-group-wrap">
                        <label class="settings-item-group-item flex-label no-wrap">
                            <label class="checkbox"><input type="checkbox" data-setting="scanning.touchInputEnabled"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                            <span>Touch inputs</span>
                        </label>
                        <label class="settings-item-group-item flex-label no-wrap">
                            <label class="checkbox"><input type="checkbox" data-setting="scanning.pointerEventsEnabled"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                            <span>Pointer inputs</span>
                        </label>
                    </div>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    To enable text scanning when using devices with a touch screen, either the <em>Touch inputs</em> or the <em>Pointer inputs</em> option must be enabled.
                    <em>Touch inputs</em> supports generic touches on a touch screen device, but do not distinguish between touch and pen inputs.
                    <em>Pointer inputs</em> supports supports the detection pen devices, but may not work on all devices.
                    If both options are enabled, <em>Pointer inputs</em> takes precedence.
                </p>
                <p>
                    The <em>Pointer inputs</em> option is only visible when the <em>Advanced</em> option is enabled.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item settings-item-button advanced-only" data-modal-action="show,input-action-prevention"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure input action prevention&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
    </div>

    <!-- Popup Behavior -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="popup"></span></div>
        <div class="heading-container-left"><h2 id="popup"><a href="#!popup">Popup Behavior</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Allow scanning search page content</div>
                <div class="settings-item-description">Text on the search page can be scanned for definitions, which will open a popup.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="scanning.enableOnSearchPage"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Allow scanning popup content</div>
                    <div class="settings-item-description">Text inside of popups can be scanned for definitions, which will open a new popup.</div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" id="nested-popups-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children settings-item-children-group" id="nested-popups-enabled-more-options" hidden>
                <div class="settings-item"><div class="settings-item-inner">
                    <div class="settings-item-left">
                        <div class="settings-item-label">Maximum number of child popups</div>
                        <div class="settings-item-description">Change the limit on the number of popups that may be generated.</div>
                    </div>
                    <div class="settings-item-right">
                        <input type="number" min="0" step="1" id="nested-popups-count">
                    </div>
                </div></div>
                <div class="settings-item advanced-only"><div class="settings-item-inner">
                    <div class="settings-item-left">
                        <div class="settings-item-label">Allow scanning popup source terms</div>
                    </div>
                    <div class="settings-item-right">
                        <label class="toggle"><input type="checkbox" data-setting="scanning.enableOnPopupExpressions"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                    </div>
                </div></div>
            </div>
        </div>
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Auto-hide search popup</div>
                    <div class="settings-item-description">When an existing popup is present, upon scanning again, hide the existing popup even if no definitions are found when scanning again.</div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="scanning.autoHideResults"
                        data-transform='{
                            "type": "setVisibility",
                            "selector": "#auto-hide-search-popup-options",
                            "condition": {"op": "===", "value": true}
                        }'
                    ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children settings-item-children-group" id="auto-hide-search-popup-options" hidden>
                <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
                    <div class="settings-item-left">
                        <div class="settings-item-label">Delay <span class="light">(in milliseconds)</span></div>
                    </div>
                    <div class="settings-item-right">
                        <input type="number" data-setting="scanning.hideDelay" min="0">
                    </div>
                </div></div>
            </div>
        </div>
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Hide popup on cursor exit</div>
                    <div class="settings-item-description">When the cursor exits the popup, the popup will be hidden.</div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="scanning.hidePopupOnCursorExit"
                        data-transform='{
                            "type": "setVisibility",
                            "selector": "#hide-popup-on-cursor-exit-options",
                            "condition": {"op": "===", "value": true}
                        }'
                    ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children settings-item-children-group" id="hide-popup-on-cursor-exit-options" hidden>
                <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
                    <div class="settings-item-left">
                        <div class="settings-item-label">Delay <span class="light">(in milliseconds)</span></div>
                    </div>
                    <div class="settings-item-right">
                        <input type="number" data-setting="scanning.hidePopupOnCursorExitDelay" min="0">
                    </div>
                </div></div>
            </div>
        </div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Search terms when clicking text from the results list</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="scanning.enablePopupSearch"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Show iframe popups in the root frame
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="general.showIframePopupsInRootFrame"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    By default, scanning text inside of an embeded <code>&lt;iframe&gt;</code> element will open
                    a new popup inside of that frame, which can sometimes be limiting due to the frame's size.
                    When this option is enabled, the popup will be created in the root of the page, if possible.
                </p>
                <p>
                    Note that when this option is enabled, there is a possibility that the extension can interfere with the underlying webpage,
                    since it must send messages to the webpage in order to determine the correct position of the popup.
                    This typically does not cause issues, but if anything unexpected happens, this option could be the cause.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
    </div>

    <!-- Appearance -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="palette"></span></div>
        <div class="heading-container-left"><h2 id="appearance"><a href="#!appearance">Appearance</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Theme</div>
                <div class="settings-item-description">Adjust the style of the popup.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Body</div>
                        <select data-setting="general.popupTheme" class="short-width short-height">
                            <option value="light">Light</option>
                            <option value="dark">Dark</option>
                            <option value="browser">Browser</option>
                        </select>
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Shadow</div>
                        <select data-setting="general.popupOuterTheme" class="short-width short-height">
                            <option value="site">Auto</option>
                            <option value="light">Light</option>
                            <option value="dark">Dark</option>
                            <option value="browser">Browser</option>
                        </select>
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Action bar appearance</div>
                    <div class="settings-item-description">Control when and where the action bar is visible.</div>
                </div>
                <div class="settings-item-right">
                    <div class="settings-item-group">
                        <div class="settings-item-group-item">
                            <div class="settings-item-group-item-label">Visibility</div>
                            <select data-setting="general.popupActionBarVisibility" class="short-width short-height">
                                <option value="auto">Auto</option>
                                <option value="always">Always</option>
                            </select>
                        </div>
                        <div class="settings-item-group-item">
                            <div class="settings-item-group-item-label">Location</div>
                            <select data-setting="general.popupActionBarLocation" class="short-width short-height">
                                <option value="left">Left</option>
                                <option value="right">Right</option>
                                <option value="top">Top</option>
                                <option value="bottom">Bottom</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Compact glossaries</div>
                <div class="settings-item-description">Display term glossaries using a more compact layout.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="general.glossaryLayoutMode"
                    data-transform='[
                        {
                            "step": "pre",
                            "type": "conditionalConvert",
                            "cases": [
                                {"op": "===", "value": false, "result": "default"},
                                {"op": "===", "value": true, "result": "compact"},
                                {"default": true, "result": "default"}
                            ]
                        },
                        {
                            "step": "post",
                            "type": "conditionalConvert",
                            "cases": [
                                {"op": "===", "value": "default", "result": false},
                                {"op": "===", "value": "compact", "result": true},
                                {"default": true, "result": false}
                            ]
                        }
                    ]'
                ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Compact tags</div>
                <div class="settings-item-description">Show fewer repeated tags for term glossaries.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="general.compactTags"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Show tags for expressions and their readings</div>
                <div class="settings-item-description">These tags can be scanned if the options for popup content scanning are enabled.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="scanning.enableSearchTags"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Show debug information</div>
                <div class="settings-item-description">A menu option to log debugging information will be shown in the search results.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="general.debugInfo"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Term display style</div>
                <div class="settings-item-description">Change how terms and their readings are displayed.</div>
            </div>
            <div class="settings-item-right">
                <select data-setting="general.termDisplayMode">
                    <option value="ruby">Term furigana</option>
                    <option value="ruby-and-reading">Term furigana and reading</option>
                    <option value="term-and-reading">Plain term and reading</option>
                    <option value="term-only">Plain term</option>
                </select>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Reading mode</div>
                <div class="settings-item-description">Change what type of furigana is displayed for parsed text.</div>
            </div>
            <div class="settings-item-right">
                <select data-setting="parsing.readingMode" lang="ja">
                    <option value="none">None</option>
                    <option value="hiragana">ひらがな</option>
                    <option value="katakana">カタカナ</option>
                    <option value="romaji">Romaji</option>
                    <option value="dictionary-reading">Dictionary reading</option>
                </select>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Frequency display style</div>
                <div class="settings-item-description">Change how frequency information is presented.</div>
            </div>
            <div class="settings-item-right">
                <select data-setting="general.frequencyDisplayMode">
                    <option value="tags">Tags</option>
                    <option value="tags-grouped">Tags, grouped content</option>
                    <option value="split-tags">Split tags</option>
                    <option value="split-tags-grouped">Split tags, grouped content</option>
                    <option value="inline-list">Inline list</option>
                    <option value="list">List</option>
                </select>
            </div>
        </div></div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Selection indicator style</div>
                    <div class="settings-item-description">Change how the selected definition entry is visually indicated.</div>
                </div>
                <div class="settings-item-right">
                    <select data-setting="general.popupCurrentIndicatorMode">
                        <option value="none">None</option>
                        <option value="asterisk">Asterisk</option>
                        <option value="triangle">Triangle</option>
                        <option value="bar-left">Vertical bar (left)</option>
                        <option value="bar-right">Vertical bar (right)</option>
                        <option value="dot-left">Small dot (left)</option>
                        <option value="dot-right">Small dot (right)</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Pitch accent display styles
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right flex-row-wrap">
                    <div class="settings-item-group settings-item-group-wrap">
                        <label class="settings-item-group-item flex-label no-wrap">
                            <label class="checkbox"><input type="checkbox" data-setting="general.showPitchAccentDownstepNotation"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                            <span>Downstep notation</span>
                        </label>
                        <label class="settings-item-group-item flex-label no-wrap">
                            <label class="checkbox"><input type="checkbox" data-setting="general.showPitchAccentPositionNotation"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                            <span>Downstep position</span>
                        </label>
                        <label class="settings-item-group-item flex-label no-wrap">
                            <label class="checkbox"><input type="checkbox" data-setting="general.showPitchAccentGraph"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                            <span>Graph</span>
                        </label>
                    </div>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Pitch accents for terms and expressions can be shown if a dictionary supporting pitch accents is installed.
                    There are currently three different ways that pitch accents can be presented:
                </p>
                <ul>
                    <li>
                        <strong>Downstep notation</strong> -
                        <span class="format-preview" lang="ja">
                            <span class="pronunciation-text-container"><span class="pronunciation-text"><span class="pronunciation-mora" data-position="0" data-pitch="high" data-pitch-next="low"><span class="pronunciation-character"></span><span class="pronunciation-mora-line"></span></span><span class="pronunciation-mora" data-position="1" data-pitch="low" data-pitch-next="low"><span class="pronunciation-character"></span><span class="pronunciation-mora-line"></span></span></span></span>
                        </span>
                    </li>
                    <li>
                        <strong>Downstep position</strong> -
                        <span class="format-preview">
                            <span class="pronunciation-downstep-notation-container"><span class="pronunciation-downstep-notation" data-downstep-position="1"><span class="pronunciation-downstep-notation-prefix">[</span><span class="pronunciation-downstep-notation-number">1</span><span class="pronunciation-downstep-notation-suffix">]</span></span></span>
                        </span>
                    </li>
                    <li>
                        <strong>Graph</strong> -
                        <span class="format-preview">
                            <span class="pronunciation-graph-container">
                                <svg xmlns="http://www.w3.org/2000/svg" class="pronunciation-graph" focusable="false" viewBox="0 0 150 100">
                                    <path class="pronunciation-graph-line" d="M25 25 L75 75"></path>
                                    <path class="pronunciation-graph-line-tail" d="M75 75 L125 75"></path>
                                    <circle class="pronunciation-graph-dot-downstep1" cx="25" cy="25" r="15"></circle>
                                    <circle class="pronunciation-graph-dot-downstep2" cx="25" cy="25" r="5"></circle>
                                    <circle class="pronunciation-graph-dot" cx="75" cy="75" r="15"></circle>
                                    <path class="pronunciation-graph-triangle" d="M0 13 L15 -13 L-15 -13 Z" transform="translate(125,75)"></path>
                                </svg>
                            </span>
                        </span>
                    </li>
                </ul>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item settings-item-button advanced-only" data-modal-action="show,collapsible-dictionaries"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure collapsible dictionaries&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
        <div class="settings-item settings-item-button advanced-only" data-modal-action="show,custom-css"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure custom CSS&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
    </div>

    <!-- Result Display -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="monitor"></span></div>
        <div class="heading-container-left"><h2 id="result-display"><a href="#!result-display">Result Display</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Result grouping mode</div>
                    <div class="settings-item-description">
                        Change how related results are grouped.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <select data-setting="general.resultOutputMode"
                        data-transform='{
                            "type": "setVisibility",
                            "selector": "#main-dictionary-container",
                            "condition": {"op": "===", "value": "merge"}
                        }'
                    >
                        <option value="split">No grouping</option>
                        <option value="group">Group term-reading pairs</option>
                        <option value="merge">Group related terms</option>
                    </select>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <ul>
                    <li>
                        <strong>No grouping</strong> -
                        Every definition will be listed as a separate entry.
                    </li>
                    <li>
                        <strong>Group term-reading pairs</strong> -
                        Definitions for the same term with the same reading will be grouped together.
                    </li>
                    <li>
                        <p>
                            <strong>Group related terms</strong> -
                            Related terms that share the same definitions will be grouped together.
                        </p>
                        <p>
                            The <em>Primary dictionary</em> option should be assigned to a dictionary which contains related term information,
                            and configuring the <em>Secondary dictionaries</em> will allow definitions for the related terms to be
                            included from other dictionaries.
                        </p>
                        <p class="warning-text">
                            Not all dictionaries are able to be selected as the <em>Primary dictionary</em>.
                        </p>
                    </li>
                </ul>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
            <div class="settings-item-children settings-item-children-group" id="main-dictionary-container" hidden>
                <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
                    <div class="settings-item-left">
                        <div class="settings-item-label">Primary dictionary</div>
                    </div>
                    <div class="settings-item-right">
                        <select data-setting="general.mainDictionary"></select>
                    </div>
                </div></div>
                <div class="settings-item settings-item-button" data-modal-action="show,secondary-search-dictionaries"><div class="settings-item-inner">
                    <div class="settings-item-left">
                        <div class="settings-item-label">Secondary dictionaries&hellip;</div>
                    </div>
                    <div class="settings-item-right open-panel-button-container">
                        <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
                    </div>
                </div></div>
            </div>
        </div>
    </div>

    <!-- Popup Position & Size -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="popup-size"></span></div>
        <div class="heading-container-left"><h2 id="popup-size"><a href="#!popup-size">Popup Position &amp; Size</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Display mode</div>
                    <div class="settings-item-description">
                        Change the layout of the popup.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <select data-setting="general.popupDisplayMode">
                        <option value="default">Default</option>
                        <option value="full-width">Full width</option>
                    </select>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    The <em>Default</em> mode will position the popup relative to the scanned text.
                    The <em>Full Width</em> mode will anchor the popup to the top or bottom of the screen and take up
                    the full width of the screen, which can be useful on devices with touch screens.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Scale</div>
                    <div class="settings-item-description">Control the scaling factor of the popup.</div>
                </div>
                <div class="settings-item-right">
                    <select data-setting="general.popupScalingFactor"
                        data-transform='[
                            {"type": "toNumber", "step": "pre", "constraints": {"min": 0.25}},
                            {"type": "toString", "step": "post"}
                        ]'
                    >
                        <option value="0.25">25%</option>
                        <option value="0.33">33%</option>
                        <option value="0.5">50%</option>
                        <option value="0.67">67%</option>
                        <option value="0.75">75%</option>
                        <option value="0.8">80%</option>
                        <option value="0.9">90%</option>
                        <option value="1">100%</option>
                        <option value="1.1">110%</option>
                        <option value="1.25">125%</option>
                        <option value="1.5">150%</option>
                        <option value="1.75">175%</option>
                        <option value="2">200%</option>
                        <option value="2.5">250%</option>
                        <option value="3">300%</option>
                        <option value="4">400%</option>
                        <option value="5">500%</option>
                    </select>
                </div>
            </div>
            <div class="settings-item-children settings-item-children-group advanced-only">
                <div class="settings-item">
                    <div class="settings-item-inner">
                        <div class="settings-item-left">
                            <div class="settings-item-label">
                                Auto-scale
                                <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                            </div>
                        </div>
                        <div class="settings-item-right flex-row-wrap">
                            <div class="settings-item-group settings-item-group-wrap">
                                <label class="settings-item-group-item flex-label no-wrap">
                                    <label class="checkbox"><input type="checkbox" data-setting="general.popupScaleRelativeToPageZoom"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                                    <span>Zoom level</span>
                                </label>
                                <label class="settings-item-group-item flex-label no-wrap">
                                    <label class="checkbox"><input type="checkbox" data-setting="general.popupScaleRelativeToVisualViewport"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                                    <span>Viewport</span>
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="settings-item-children more" hidden>
                        <p>
                            Auto-scaling will scale the popup automatically based on the browser's zoom levels
                            in order to keep the popup at a constant physical size, regardless of the zoom level.
                            <em>Zoom level</em> uses the zoom level that is typically used on desktop browsers,
                            and <em>Viewport</em> uses the zoom level that is typically used on mobile browsers.
                        </p>
                        <p>
                            <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                        </p>
                    </div>
                </div>
            </div>
        </div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Size</div>
                <div class="settings-item-description">Control the size of the popup, in pixels.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Width</div>
                        <input type="number" class="short-width short-height" min="1" data-setting="general.popupWidth">
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Height</div>
                        <input type="number" class="short-width short-height" min="1" data-setting="general.popupHeight">
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Horizontal text positioning</div>
                <div class="settings-item-description">Change where the popup is positioned relative to horizontal text.</div>
            </div>
            <div class="settings-item-right">
                <select data-setting="general.popupHorizontalTextPosition">
                    <option value="below">Below text</option>
                    <option value="above">Above text</option>
                </select>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Vertical text positioning</div>
                <div class="settings-item-description">Change where the popup is positioned relative to vertical text.</div>
            </div>
            <div class="settings-item-right">
                <select data-setting="general.popupVerticalTextPosition">
                    <option value="default">Same as horizontal text</option>
                    <option value="before">Before reading direction</option>
                    <option value="after">After reading direction</option>
                    <option value="left">Left of text</option>
                    <option value="right">Right of text</option>
                </select>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Horizontal text offset</div>
                <div class="settings-item-description">Change the distance the popup is placed relative to horizontal text.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">x</div>
                        <input type="number" class="short-width short-height" data-setting="general.popupHorizontalOffset">
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">y</div>
                        <input type="number" class="short-width short-height" data-setting="general.popupVerticalOffset">
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Vertical text offset</div>
                <div class="settings-item-description">Change the distance the popup is placed relative to vertical text.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">x</div>
                        <input type="number" class="short-width short-height" data-setting="general.popupHorizontalOffset2">
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">y</div>
                        <input type="number" class="short-width short-height" data-setting="general.popupVerticalOffset2">
                    </div>
                </div>
            </div>
        </div></div>
    </div>

    <!-- Window -->
    <div class="heading-container advanced-only">
        <div class="heading-container-icon"><span class="icon" data-icon="window"></span></div>
        <div class="heading-container-left"><h2 id="window"><a href="#!window">Window</a></h2></div>
        <div class="heading-container-right"><a tabindex="0" class="heading-link-light" id="test-window-open-link">Open&hellip;</a></div>
    </div>
    <div class="settings-group advanced-only">
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Use a native browser window instead of an embedded popup
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="general.usePopupWindow"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Instead of showing definitions in a popup embedded into the webpage,
                    a native browser window containing the popup content will be opened instead.
                    This window will be shared across all tabs.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Size</div>
                <div class="settings-item-description">Control the size of the window, in pixels.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Width</div>
                        <input type="number" class="short-width short-height" min="0" step="1" data-setting="popupWindow.width">
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Height</div>
                        <input type="number" class="short-width short-height" min="0" step="1" data-setting="popupWindow.height">
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Left position</div>
                <div class="settings-item-description">Control the left position of the window, in pixels.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item" id="popup-window-left-container" hidden>
                        <div class="settings-item-group-item-label">x</div>
                        <input type="number" class="short-width short-height" step="1" data-setting="popupWindow.left">
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Mode</div>
                        <select class="short-width short-height" data-setting="popupWindow.useLeft"
                            data-transform='[
                                {
                                    "step": "pre",
                                    "type": "toBoolean"
                                },
                                {
                                    "type": "setVisibility",
                                    "selector": "#popup-window-left-container",
                                    "condition": {"op": "===", "value": true}
                                },
                                {
                                    "step": "post",
                                    "type": "toString"
                                }
                            ]'
                        >
                            <option value="false">Auto</option>
                            <option value="true">Manual</option>
                        </select>
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Top position</div>
                <div class="settings-item-description">Control the top position of the window, in pixels.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item" id="popup-window-top-container" hidden>
                        <div class="settings-item-group-item-label">y</div>
                        <input type="number" class="short-width short-height" step="1" data-setting="popupWindow.top">
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Mode</div>
                        <select class="short-width short-height" data-setting="popupWindow.useTop"
                            data-transform='[
                                {
                                    "step": "pre",
                                    "type": "toBoolean"
                                },
                                {
                                    "type": "setVisibility",
                                    "selector": "#popup-window-top-container",
                                    "condition": {"op": "===", "value": true}
                                },
                                {
                                    "step": "post",
                                    "type": "toString"
                                }
                            ]'
                        >
                            <option value="false">Auto</option>
                            <option value="true">Manual</option>
                        </select>
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Window style</div>
                <div class="settings-item-description">Change the appearance of the window.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Type</div>
                        <select class="short-width short-height" data-setting="popupWindow.windowType">
                            <option value="normal">Normal</option>
                            <option value="popup">Popup</option>
                        </select>
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">State</div>
                        <select class="short-width short-height" data-setting="popupWindow.windowState">
                            <option value="normal">Normal</option>
                            <option value="maximized">Maximized</option>
                            <option value="fullscreen">Fullscreen</option>
                        </select>
                    </div>
                </div>
            </div>
        </div></div>
    </div>

    <!-- Audio -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="speaker"></span></div>
        <div class="heading-container-left"><h2 id="audio"><a href="#!audio">Audio</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Enable audio playback for terms</div>
                <div class="settings-item-description">Show a clickable speaker icon next to search results.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="audio.enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Auto-play search result audio</div>
                <div class="settings-item-description">The audio for the first result will be played automatically.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="audio.autoPlay"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Audio volume</div>
                <div class="settings-item-description">Adjust the volume audio is played at, in percent.</div>
            </div>
            <div class="settings-item-right">
                <input type="number" data-setting="audio.volume" min="0" max="100">
            </div>
        </div></div>
        <div class="settings-item settings-item-button" data-modal-action="show,audio-sources"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure audio playback sources&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
    </div>

    <!-- Text Parsing -->
    <div>
        <div class="heading-container">
            <div class="heading-container-icon"><span class="icon" data-icon="text-parsing"></span></div>
            <div class="heading-container-left"><h2 id="text-parsing"><a href="#!text-parsing">Text Parsing</a></h2></div>
            <div class="heading-container-right"><a tabindex="0" class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
        </div>
        <div class="heading-description more" hidden>
            <p>
                Yomitan is able to scan the sentence surrounding a term and parse individual words
                of the query on the <a href="/search.html" target="_blank" rel="noopener">search page</a>.
                This information can also be added to Anki cards to provide additional context.
            </p>
            <p>
                <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
            </p>
        </div>
    </div>
    <div class="settings-group">
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Parse sentences using Yomitan's internal parser</div>
                    <div class="settings-item-description">
                        Sentence words are parsed using Yomitan's dictionaries.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="parsing.enableScanningParser"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Yomitan's internal parser is a simple algorithm which can parse sentences using the installed dictionaries.
                    It works by repeatedly detecting the longest term at the start of the sentence and advancing until no text remains.
                    This provides decent results for the general case, but since grammatical structure is not taken into account,
                    it can sometimes yield incorrect segmentation.
                </p>
                <p class="margin-above">
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item advanced-only" data-hide-for-browser="firefox-mobile">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-invalid-indicator"></div>
                    <div class="settings-item-label">
                        Parse sentences using <a href="https://en.wikipedia.org/wiki/MeCab" target="_blank" rel="noopener noreferrer">MeCab</a>
                    </div>
                    <div class="settings-item-description">
                        Sentence words are parsed using a third-party program.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" class="permissions-toggle" data-permissions-setting="parsing.enableMecabParser" data-required-permissions="nativeMessaging"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    MeCab is a third-party program which uses its own dictionaries and parsing algorithm to decompose sentences into individual words.
                    MeCab may provide more accurate parsing results than Yomitan's internal parser.
                </p>
                <p>
                    In order for Yomitan to use it, both MeCab and a native messaging component must be installed.
                    A setup guide can be found <a href="https://github.com/themoeway/yomitan-mecab-installer/blob/master/README.md" target="_blank" rel="noopener noreferrer">here</a>.
                </p>
                <div class="margin-above flex-row-nowrap">
                    <button type="button" id="test-mecab-button">Test</button>
                    <div id="test-mecab-results" class="flex-margin-left" hidden></div>
                </div>
                <p class="margin-above">
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Show space between parsed words</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="parsing.termSpacing"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Sentence scanning extent</div>
                <div class="settings-item-description">Adjust how many characters are bidirectionally scanned to form a sentence.</div>
            </div>
            <div class="settings-item-right">
                <input type="number" data-setting="sentenceParsing.scanExtent" min="0" step="1">
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Sentence termination characters</div>
            </div>
            <div class="settings-item-right">
                <div class="horizontal-flex horizontal-flex-nowrap">
                    <button type="button" class="low-emphasis" data-modal-action="show,sentence-termination-characters" id="configure-sentence-termination-characters-button" hidden>Configure&hellip;</button>
                    <select data-setting="sentenceParsing.terminationCharacterMode"
                        data-transform='{
                            "type": "setVisibility",
                            "selector": "#configure-sentence-termination-characters-button",
                            "condition": {
                                "op": "||",
                                "value": [
                                    {"op": "===", "value": "custom"},
                                    {"op": "===", "value": "custom-no-newlines"}
                                ]
                            }
                        }'
                    >
                        <option value="custom">Custom</option>
                        <option value="custom-no-newlines">Custom, no newlines</option>
                        <option value="newlines">Newlines only</option>
                        <option value="none">None</option>
                    </select>
                </div>
            </div>
        </div></div>
    </div>

    <!-- Translation -->
    <div class="advanced-only">
        <div class="heading-container">
            <div class="heading-container-icon"><span class="icon" data-icon="translation"></span></div>
            <div class="heading-container-left"><h2 id="translation"><a href="#!translation">Translation</a></h2></div>
        </div>
    </div>
    <div class="settings-group advanced-only">
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Dictionary search resolution</div>
                <div class="settings-item-description" lang="en"><p>"A dog"&#x3000;&rarr;&#x3000;search for "A dog","A do", "A d", "A"</p> or <p>"A dog"&#x3000;&rarr;&#x3000;"A dog", "A"</p></div>
            </div>
            <div class="settings-item-right">
                <select data-setting="translation.searchResolution">
                    <option value="letter">Letter</option>
                    <option value="word">Word</option>
                </select>
            </div>
        </div></div>
        <div class="settings-item settings-item-button" data-modal-action="show,translation-text-replacement-patterns"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure custom text replacement patterns&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
    </div>

    <!-- Anki -->
    <div>
        <div class="heading-container">
            <div class="heading-container-icon"><span class="icon" data-icon="note-card"></span></div>
            <div class="heading-container-left"><h2 id="anki"><a href="#!anki">Anki</a></h2></div>
            <div class="heading-container-right"><a tabindex="0" class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
        </div>
        <div class="heading-description more" hidden>
            <p>
                Yomitan supports automatic flashcard creation for <a href="https://apps.ankiweb.net/" target="_blank" rel="noopener noreferrer">Anki</a>,
                a free application designed to assist in remembering information.
                This feature requires installation of the <a href="https://foosoft.net/projects/anki-connect/" target="_blank" rel="noopener noreferrer">AnkiConnect</a> plugin.
            </p>
            <p>
                <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
            </p>
        </div>
    </div>
    <div class="settings-group">
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Enable Anki integration</div>
                    <div class="settings-item-description">
                        <span>Connection status:</span>
                        <span id="anki-error-message">&hellip;</span> <a tabindex="0" id="anki-error-message-details-toggle" hidden>Details&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="anki.enable"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children" id="anki-error-message-details-container" hidden>
                <p>
                    <a tabindex="0" id="anki-error-log">Log error to console</a>
                </p>
                <p class="danger-text" id="anki-error-invalid-response-info" hidden>
                    Attempting to connect to Anki can sometimes return an error message which includes "Invalid response",
                    which may indicate that the value of the <em>AnkiConnect server address</em> option is incorrect.
                    Resetting it to the default value may fix issues that are occurring.
                </p>
                <div class="danger-text" id="anki-error-message-details"></div>
            </div>
            <div class="settings-item-children" data-show-for-os="mac">
                <p class="warning-text">
                    <strong>Notice for macOS users:</strong>
                    If Yomitan has issues connecting to AnkiConnect, it may be necessary to adjust adjust some system settings.
                    See <a href="https://foosoft.net/projects/anki-connect/#notes-for-mac-os-x-users" target="_blank" rel="noopener noreferrer">this link</a> for details.
                </p>
            </div>
        </div>
        <div class="settings-item">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">AnkiConnect server address</div>
                    <div class="settings-item-description">
                        Change the URL of the AnkiConnect server.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <input type="text" placeholder="http://127.0.0.1:8765" spellcheck="false" autocomplete="off" data-setting="anki.server">
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    The default address for a server on the same device is <a href="http://127.0.0.1:8765" target="_blank" rel="noopener noreferrer">http://127.0.0.1:8765</a>.
                    If Anki is running and AnkiConnect is installed, clicking this URL should open a page showing the current version of AnkiConnect.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Card tags</div>
                <div class="settings-item-description">List of space or comma separated tags to add to the card.</div>
            </div>
            <div class="settings-item-right">
                <input type="text" spellcheck="false" autocomplete="off" data-setting="anki.tags"
                    data-transform='[
                        {"type": "splitTags", "step": "pre"},
                        {"type": "joinTags", "step": "post"}
                    ]'
                >
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">API key</div>
                <div class="settings-item-description">Pass a secret value to AnkiConnect API calls.</div>
            </div>
            <div class="settings-item-right">
                <input type="password" placeholder="Disabled" spellcheck="false" autocomplete="off" data-setting="anki.apiKey" id="anki-api-key-input">
            </div>
        </div></div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Check for card duplicates</div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="anki.checkForDuplicates"
                        data-transform='{
                            "type": "setVisibility",
                            "selector": "#anki-card-duplicate-options",
                            "condition": {"op": "===", "value": true}
                        }'
                    ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children settings-item-children-group" id="anki-card-duplicate-options" hidden>
                <div class="settings-item">
                    <div class="settings-item-inner">
                        <div class="settings-item-left">
                            <div class="settings-item-label">
                                Check for duplicates across all models
                                <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                            </div>
                        </div>
                        <div class="settings-item-right">
                            <label class="toggle"><input type="checkbox" data-setting="anki.duplicateScopeCheckAllModels"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                        </div>
                    </div>
                    <div class="settings-item-children more" hidden>
                        <p>
                            By default, duplicate checks are only performed for notes created with the same model.
                            Enabling this option will check for duplicates across <em>all</em> model types.
                        </p>
                        <p>
                            <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                        </p>
                    </div>
                </div>
                <div class="settings-item">
                    <div class="settings-item-inner settings-item-inner-wrappable">
                        <div class="settings-item-left">
                            <div class="settings-item-label">
                                Duplicate card scope
                                <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                            </div>
                        </div>
                        <div class="settings-item-right">
                            <select data-setting="anki.duplicateScope">
                                <option value="collection">Collection</option>
                                <option value="deck">Deck</option>
                                <option value="deck-root">Deck root</option>
                            </select>
                        </div>
                    </div>
                    <div class="settings-item-children more" hidden>
                        <p>
                            A card is considered a duplicate if the value of the first field matches that of any other card.
                            By default, this check will include cards across all decks in a collection, but this constraint can be relaxed
                            by using either the <em>Deck</em> or <em>Deck root</em> option.
                        </p>
                        <p>
                            The <em>Deck</em> option will only check for duplicates in the target deck.
                            The <em>Deck root</em> option will additionally check for duplicates in all child decks of the root deck.
                            This allows adding cards that are unique for decks including a subdeck structure.
                            For decks which don't have any parent-child hierarchy, both options function the same.
                        </p>
                        <p>
                            <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                        </p>
                    </div>
                </div>
                <div class="settings-item">
                    <div class="settings-item-inner settings-item-inner-wrappable">
                        <div class="settings-item-left">
                            <div class="settings-item-label">
                                When a duplicate is detected
                            </div>
                        </div>
                        <div class="settings-item-right">
                            <select data-setting="anki.duplicateBehavior">
                                <option value="prevent">Prevent adding</option>
                                <option value="new">Allow adding</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Screenshot format</div>
                <div class="settings-item-description">Adjust the format and quality of screenshots created for cards.</div>
            </div>
            <div class="settings-item-right">
                <div class="settings-item-group">
                    <div class="settings-item-group-item" id="anki-screenshot-quality" hidden>
                        <div class="settings-item-group-item-label">Quality (%)</div>
                        <input type="number" class="short-width short-height" data-setting="anki.screenshot.quality" min="0" max="100" step="1">
                    </div>
                    <div class="settings-item-group-item">
                        <div class="settings-item-group-item-label">Format</div>
                        <select class="short-width short-height" data-setting="anki.screenshot.format"
                            data-transform='{
                                "type": "setVisibility",
                                "selector": "#anki-screenshot-quality",
                                "condition": {"op": "===", "value": "jpeg"}
                            }'
                        >
                            <option value="png">PNG</option>
                            <option value="jpeg">JPEG</option>
                        </select>
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner settings-item-inner-wrappable">
                <div class="settings-item-left">
                    <div class="settings-item-label">Idle download timeout <span class="light">(in milliseconds)</span></div>
                    <div class="settings-item-description">
                        The maximum time before an idle download will be cancelled; 0 = no limit.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <input type="number" data-setting="anki.downloadTimeout" min="0">
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Audio files can be downloaded from remote servers when creating Anki cards,
                    and sometimes these downloads can stall due to server or internet connectivity issues.
                    When this setting has a non-zero value, if a download has stalled for longer than the time specified,
                    the download will be cancelled.
                </p>
                <p class="margin-above">
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item advanced-only"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Suspend new cards</div>
                <div class="settings-item-description">New cards will be suspended when a note is added.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="anki.suspendNewCards"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Note viewer window</div>
                    <div class="settings-item-description">
                        Clicking the <em>View added note</em> button shows this window.
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <select data-setting="anki.noteGuiMode">
                        <option value="browse">Card browser</option>
                        <option value="edit">Note editor</option>
                    </select>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    AnkiConnect releases after around 2022-05-29 support a new note editor window
                    which can be shown when clicking the <em>View added note</em> button.
                    This can be tested using the buttons below.
                    If an error occurs, Anki and/or AnkiConnect may need to be updated.
                </p>
                <div class="test-anki-note-viewer-container">
                    <button type="button" class="test-anki-note-viewer-button" data-mode="browse">Test <em>Card browser</em></button>
                    <button type="button" class="test-anki-note-viewer-button" data-mode="edit">Test <em>Note editor</em></button>
                    <div class="test-anki-note-viewer-results" id="test-anki-note-viewer-results" hidden></div>
                </div>
                <p class="margin-above">
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Show card tags
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <select data-setting="anki.displayTags">
                        <option value="never">Never</option>
                        <option value="always">Always</option>
                        <option value="non-standard">Non-standard</option>
                    </select>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    When coming across a word that is already in an Anki deck, a button will appear that shows
                    the tags the card has. If set to <em>Non-standard</em>, all tags that are included in the
                    <em>Card tags</em> option will be filtered out from the list. If no tags remain after filtering,
                    then the button will not be shown.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item settings-item-button" data-modal-action="show,anki-cards"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure Anki card format&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
        <div class="settings-item settings-item-button advanced-only" data-modal-action="show,anki-card-templates"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure Anki card templates&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
        <div class="settings-item settings-item-button advanced-only" data-modal-action="show,generate-anki-notes" id="generate-anki-notes-main-settings-entry"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Generate Anki Notes (Experimental)&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
    </div>

    <!-- Clipboard -->
    <div>
        <div class="heading-container">
            <div class="heading-container-icon"><span class="icon" data-icon="clipboard"></span></div>
            <div class="heading-container-left"><h2 id="clipboard"><a href="#!clipboard">Clipboard</a></h2></div>
            <div class="heading-container-right"><a tabindex="0" class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
        </div>
        <div class="heading-description more" hidden>
            <p>
                Yomitan can watch the system copy clipboard for Japanese text and automatically search the
                text on the search page.
                This can be useful for using Yomitan to scan text from external applications.
            </p>
            <p>
                This feature requires Yomitan to have clipboard reading permissions, and when this option is enabled,
                the clipboard will be frequently checked for new text.
            </p>
            <p>
                <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
            </p>
        </div>
    </div>
    <div class="settings-group">
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-invalid-indicator"></div>
                <div class="settings-item-label">Enable background clipboard text monitoring</div>
                <div class="settings-item-description">Open the search page in a new window when the clipboard contains Japanese text.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" class="permissions-toggle" data-permissions-setting="clipboard.enableBackgroundMonitor" data-required-permissions="clipboardRead"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-invalid-indicator"></div>
                <div class="settings-item-label">Enable search page clipboard text monitoring</div>
                <div class="settings-item-description">The query on the search page will be automatically updated with text in the clipboard.</div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" class="permissions-toggle" data-permissions-setting="clipboard.enableSearchPageMonitor" data-required-permissions="clipboardRead"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Maximum clipboard text search length</div>
                <div class="settings-item-description">Limit the number of characters used when searching clipboard text.</div>
            </div>
            <div class="settings-item-right">
                <input type="number" min="0" step="1" data-setting="clipboard.maximumSearchLength">
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
            <div class="settings-item-left">
                <div class="settings-item-label">Clipboard text search mode</div>
                <div class="settings-item-description">Change how the search page reacts to new text in the clipboard.</div>
            </div>
            <div class="settings-item-right">
                <select data-setting="clipboard.autoSearchContent"
                    data-transform='[
                        {
                            "step": "pre",
                            "type": "toBoolean"
                        },
                        {
                            "step": "post",
                            "type": "toString"
                        }
                    ]'
                >
                    <option value="true">Search for definitions</option>
                    <option value="false">Update query only</option>
                </select>
            </div>
        </div></div>
    </div>

    <!-- Shortcuts -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="keyboard"></span></div>
        <div class="heading-container-left"><h2 id="shortcuts"><a href="#!shortcuts">Shortcuts</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    <p>
                        Yomitan has two categories of keyboard shortcuts:
                    </p>
                    <ul>
                        <li>
                            <strong>Standard</strong> keyboard shortcuts are controlled by the extension, and can be added, removed,
                            and configured to work on webpages that Yomitan functions on.
                        </li>
                        <li>
                            <strong>Native</strong> keyboard shortcuts are controlled by the web browser, and function globally
                            within the web browser<span data-show-for-browser="chrome edge"> or system-wide</span>.
                        </li>
                    </ul>
                </div>
            </div>
        </div></div>
        <div class="settings-item settings-item-button" data-modal-action="show,keyboard-shortcuts"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure standard keyboard shortcuts&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
        <div class="settings-item settings-item-button" data-modal-action="show,extension-keyboard-shortcuts"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure native keyboard shortcuts&hellip;</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></div>
    </div>

    <!-- Backup -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="backup"></span></div>
        <div class="heading-container-left"><h2 id="backup"><a href="#!backup">Backup</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    Yomitan can import and export settings files which can be
                    used to restore settings, share settings across devices,
                    and to help to debug problems. These files will only
                    contain settings and will not contain dictionaries.
                    Dictionaries must be imported separately. However, you can
                    also import a previously exported collection of
                    dictionaries. See the next section about that.
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-right settings-item-button-group-container">
                <div class="settings-item-button-group">
                    <div class="settings-item-button-group-item">
                        <button type="button" class="low-emphasis" id="settings-import-button">Import Settings</button>
                        <div hidden><input type="file" id="settings-import-file" accept=".json,application/json"></div>
                    </div>
                    <div class="settings-item-button-group-item">
                        <button type="button" class="low-emphasis" id="settings-export-button">Export Settings</button>
                    </div>
                    <div class="settings-item-button-group-item">
                        <button type="button" class="low-emphasis danger" id="settings-reset-button">Reset Settings</button>
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    You can try to export the entire collection of your
                    dictionaries into a single large file that you can try to
                    import from other browsers or devices. Importing the
                    collection like that is a destructive operation and will
                    replace your current database of dictionaries so please
                    proceed with caution. These operations can take a lot of
                    time depending on the size of your database, especially to
                    start and to complete, so have patience.

                    <br><br>

                    See <a href="https://github.com/themoeway/yomichan-data-exporter" target="_blank" rel="noopener noreferrer">yomichan-data-exporter</a> for
                    instructions to export your data from older Yomichan installations.
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-right settings-item-button-group-container">
                <div class="settings-item-button-group">
                    <div class="settings-item-button-group-item">
                        <button type="button" class="low-emphasis" id="settings-import-db-button">Import Dictionary Collection</button>
                        <div hidden><input type="file" id="settings-import-db" accept=".json,application/json"></div>
                    </div>
                    <div class="settings-item-button-group-item">
                        <button type="button" class="low-emphasis" id="settings-export-db-button">Export Dictionary Collection</button>
                    </div>
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-progress-report" id="db-ops-progress-report">
                    Placeholder text.
                </div>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-error-report" id="db-ops-error-report">
                    Placeholder text.
                </div>
            </div>
        </div></div>
    </div>

    <!-- Accessibility -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="accessibility"></span></div>
        <div class="heading-container-left"><h2 id="accessibility"><a href="#!accessibility">Accessibility</a></h2></div>
    </div>
    <div class="settings-group">
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Enable Google Docs compatibility mode
                        <a tabindex="0" class="more-toggle more-only danger-text" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="accessibility.forceGoogleDocsHtmlRendering"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Google Docs now uses
                    <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas" target="_blank" rel="noopener noreferrer">canvas-based</a>
                    rendering to display content<sup><a href="https://workspaceupdates.googleblog.com/2021/05/Google-Docs-Canvas-Based-Rendering-Update.html" target="_blank" rel="noopener noreferrer">[2]</a></sup>
                    which prevents Yomitan from being able to scan text using the standard methods.
                    Enabling this option will force Google Docs webpages to expose some additional text
                    information which should allow Yomitan to still work.
                </p>
                <p class="warning-text">
                    If any profile has this setting enabled, compatibility mode will be activated;
                    profile conditions are ignored.
                </p>
                <p class="danger-text">
                    Google has changed this compatibility implementation several times, and the changes do not seem to be announced or documented.
                    Therefore, it is possible that this feature could stop working at any time the future without warning.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
    </div>

    <!-- Security -->
    <div class="heading-container">
        <div class="heading-container-icon"><span class="icon" data-icon="lock"></span></div>
        <div class="heading-container-left"><h2 id="security"><a href="#!security">Security</a></h2></div>
    </div>
    <div class="settings-group">
        <a href="/permissions.html" rel="noopener" class="settings-item settings-item-button"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Configure Yomitan Permissions</div>
            </div>
            <div class="settings-item-right open-panel-button-container">
                <button type="button" class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
            </div>
        </div></a>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Use a secure container around popups
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="general.usePopupShadowDom"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    On <a href="https://caniuse.com/shadowdomv1" target="_blank" rel="noopener noreferrer">supported browsers</a>,
                    a popup's <code>iframe</code> element will be embeded inside of a container with a closed <a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM" target="_blank" rel="noopener noreferrer">shadow DOM</a>.
                    This container prevents scripts running on the underlying web page from being able to discover the <code>iframe</code>,
                    which helps avoid situations where the web page might try to modify or use the Yomitan popup for an unintended purpose.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
        <div class="settings-item advanced-only">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Use secure popup frame URL
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="general.useSecurePopupFrameUrl"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    When this option is enabled, the URL of the <code>iframe</code> element will be assigned by
                    directly changing the location of the <code>iframe</code>'s internal document, rather than using
                    the <code>iframe</code>'s <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-src" target="_blank" rel="noopener noreferrer"><code>src</code></a>
                    attribute. This results in the extension URL not being exposed to the underling web page, and thus making it harder
                    to detect the presence of Yomitan.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
                </p>
            </div>
        </div>
    </div>

    <div class="footer-padding"></div>

</div>
<div class="content-right">
    <div class="preview-sidebar"><div class="preview-sidebar-inner">
        <div class="preview-frame-container">
            <iframe class="preview-frame" id="popup-preview-frame"></iframe>
        </div>
    </div></div>
</div>
</div></div>


<!-- Auxiliary content -->
<div class="content-dimmer"></div>

<div class="fab-container">
    <div class="fab-container-left"></div>
    <div class="fab-container-center"></div>
    <div class="fab-container-right">
        <div class="fab-container-right-inner1"><div class="fab-container-right-inner2">
            <div class="fab-container-item fab-container-item-popup-preview">
                <button type="button" class="fab-button icon-button" data-action="toggle-preview-sidebar"><span class="icon-button-inner"><span class="fab-button-background"></span><span class="icon" data-icon="popup"></span></span></button>
            </div>
            <div class="fab-container-item">
                <button type="button" class="fab-button icon-button" data-action="toggle-sidebar"><span class="icon-button-inner"><span class="fab-button-background"></span><span class="icon" data-icon="hamburger-menu"></span></span></button>
            </div>
        </div></div>
    </div>
</div>

<div class="status-footer-container" hidden><div class="status-footer-container2">
    <div class="status-footer">
        <div class="status-footer-header"><div class="status-footer-header-label">Tasks in progress:</div><a tabindex="0" class="status-footer-header-close">Close</a></div>
        <div class="status-footer-item dictionary-delete-progress" hidden>
            <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
            <div class="progress-bar-track"><div class="progress-bar danger"></div></div>
        </div>
        <div class="status-footer-item dictionary-import-progress" hidden>
            <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
            <div class="progress-bar-track"><div class="progress-bar"></div></div>
        </div>
    </div>
</div></div>

<div id="popup-menus"></div>


<!-- Profile modals -->
<div id="profiles-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Profiles</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div class="profile-entry-header">
            <div class="profile-entry-cell"></div>
            <div class="profile-entry-cell"><span class="profile-entry-header-text">Default</span></div>
            <div class="profile-entry-cell"><span class="profile-entry-header-text">Name</span></div>
            <div class="profile-entry-cell"><span class="profile-entry-header-text">Conditions</span></div>
            <div class="profile-entry-cell"></div>
        </div>
        <div class="profile-entry-list generic-list" id="profile-entry-list"></div>
        <div class="profile-add-button-container">
            <button type="button" class="low-emphasis" id="profile-add-button">Add</button>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="profile-conditions-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Profile Conditions</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Conditions for profile <em id="profile-conditions-profile-name"></em>:
                    </div>
                </div>
                <div class="settings-item-right">
                    <a tabindex="0" class="more-toggle more-only" data-parent-distance="3">Info&hellip;</a>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    Profile usage conditions are used to automatically select certain profiles based on context.
                    For example, different profiles can be used depending on the nested level of the popup, or based on the website's URL.
                </p>
                <p>
                    Conditions are organized into groups corresponding to the order in which they are checked.
                    If all of the conditions in any group of a profile are met, then that profile will be used for that context.
                </p>
                <p>
                    If no conditions are specified, the profile will only be used if it is selected as the default profile.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Hide&hellip;</a>
                </p>
            </div>
        </div>
        <div class="profile-condition-groups" id="profile-condition-groups"></div>
        <div class="profile-condition-group-list-info">
            <div class="profile-condition-groups-empty-info"><em>No conditions set up.</em></div>
            <div class="profile-condition-group-list-info-space"></div>
            <button type="button" class="low-emphasis" id="profile-add-condition-group">Add Group</button>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="profile-copy-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header">
        <div class="modal-title">Copy Profile</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <p>Select which profile to copy options from:</p>
        <select class="form-control" id="profile-copy-source-select"></select>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" id="profile-copy-confirm-button">Copy Profile</button>
    </div>
</div></div>

<div id="profile-remove-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Confirm Profile Deletion</div></div>
    <div class="modal-body">
        <p>
            Are you sure you want to delete the profile <em id="profile-remove-name"></em>?
        </p>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" class="danger" id="profile-remove-confirm-button">Remove Profile</button>
    </div>
</div></div>


<!-- Dictionary modals -->
<div id="dictionaries-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Dictionaries</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Enable support for prefix wildcard searches
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" data-setting="global.database.prefixWildcardsSupported" data-scope="global"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p>
                    In order for dictionaries to support searches using prefix wildcards on the search page,
                    some additional data must be stored in the database.
                    Enabling this option will include this extra data for any new dictionaries that are imported.
                </p>
                <p class="warning-text">
                    This option will not change any dictionaries that are already imported;
                    they must be re-imported for the option to take effect.
                </p>
                <p>
                    <a tabindex="0" class="more-toggle" data-parent-distance="3">Hide&hellip;</a>
                </p>
            </div>
        </div>

        <div class="warning-text margin-above no-dictionaries-installed-warning" hidden>
            No dictionaries have been installed yet.
            Visit the <a href="https://github.com/themoeway/yomitan/blob/master/docs/dictionaries.md#dictionaries" target="_blank" rel="noopener noreferrer">Yomitan homepage</a>
            for a list of free dictionaries or click the <em>Import</em> button below to select a dictionary file to import.
        </div>
        <div id="dictionary-error" class="danger-text margin-above" hidden></div>
        <div id="dictionary-list" class="dictionary-list generic-list" data-count="0">
            <div class="dictionary-item-top"></div>
            <label class="dictionary-item-top toggle dictionary-item-enabled-toggle-container"><input type="checkbox" id="all-dictionaries-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            <div class="dictionary-item-top dictionary-item-title-container">All</div>
            <div class="dictionary-item-top">Priority</div>
            <div class="dictionary-item-top dictionary-item-button-height"></div>
        </div>

        <div hidden><input type="file" id="dictionary-import-file-input" accept=".zip,application/zip" multiple></div>
    </div>
    <div class="modal-body-addon dictionary-delete-progress" hidden>
        <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
        <div class="progress-bar-track"><div class="progress-bar danger"></div></div>
    </div>
    <div class="modal-body-addon dictionary-import-progress" hidden>
        <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
        <div class="progress-bar-track"><div class="progress-bar"></div></div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis danger dictionary-database-mutating-input" id="dictionary-delete-all-button">Delete All</button>
        <button type="button" class="low-emphasis dictionary-database-mutating-input" id="dictionary-check-integrity">Check Integrity</button>
        <button type="button" class="low-emphasis dictionary-database-mutating-input" id="dictionary-import-file-button">Import</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="dictionary-confirm-delete-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Confirm Dictionary Deletion</div></div>
    <div class="modal-body">
        <p>Are you sure you want to delete the dictionary:</p>
        <p><strong id="dictionary-confirm-delete-name"></strong>?</p>
        <p class="danger-text">This action cannot be undone.</p>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" class="danger" data-modal-action="hide" id="dictionary-confirm-delete-button">Delete</button>
    </div>
</div></div>

<div id="dictionary-confirm-delete-all-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Confirm Dictionary Deletion</div></div>
    <div class="modal-body">
        <p>Are you sure you want to delete <strong>all dictionaries</strong>?</p>
        <p class="danger-text">This action cannot be undone.</p>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" class="danger" data-modal-action="hide" id="dictionary-confirm-delete-all-button">Delete</button>
    </div>
</div></div>

<div id="secondary-search-dictionaries-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Secondary Search Dictionaries</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <p>
            These dictionaries will be used to search for definitions of the related terms when the grouping mode is
            <em>Group related terms</em>.
        </p>
        <div id="secondary-search-dictionary-list" class="secondary-search-dictionary-list"></div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="collapsible-dictionaries-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Collapsible Dictionaries</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body-addon">
        <p>
            Dictionary definitions can be collapsed if they exceed a certain line count,
            which may be useful for dictionaries with long definitions.
            The appearance can be customized using custom CSS.
            <a tabindex="0" data-modal-action="show,collapsible-dictionaries-info">More&hellip;</a>
        </p>
    </div>
    <div class="modal-body">
        <div id="collapsible-dictionary-list" class="collapsible-dictionary-list"></div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="collapsible-dictionaries-info-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Collapsible Dictionary Info</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <p>
            Dictionary definitions can be collapsed if they exceed a certain line count,
            which may be useful for dictionaries with long definitions.
            There are five different modes:
        </p>
        <ul>
            <li>
                <strong>Not collapsible</strong> -
                Definitions will not be collapsed.
            </li>
            <li>
                <strong>Collapsed</strong> -
                Definitions will show a collapse button if their size exceeds the max height,
                and they will be collapsed by default.
            </li>
            <li>
                <strong>Expanded</strong> -
                Definitions will show a collapse button if their size exceeds the max height,
                and they will be expanded by default.
            </li>
            <li>
                <strong>Force collapsed</strong> -
                Definitions will always show a collapse button,
                and they will be collapsed by default.
            </li>
            <li>
                <strong>Force expanded</strong> -
                Definitions will always show a collapse button,
                and they will be expanded by default.
            </li>
        </ul>
        <p>
            By default, the number of lines shown for a definition is 3.
            This can be configured by adjusting the <a tabindex="0" data-modal-action="show,custom-css">custom CSS</a>;
            the value can be a unitless integer or decimal number.
        </p>
        <div class="code margin-above">/* Globally set the line count */
:root {
    --collapsible-definition-line-count: 2;
}

/* Set the line count for a specific dictionary */
.definition-item[data-dictionary='JMdict'] {
    --collapsible-definition-line-count: 2;
}

/* Spoiler-like functionality, use with <em>Force collapsed</em> mode */
.definition-item[data-dictionary='JMdict'] .definition-item-inner.collapsible.collapsed {
    color: #000000;
    background-color: #000000;
}
</div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="dictionary-details-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title"><strong class="dictionary-title"></strong> <span class="light dictionary-version"></span></div>
    </div>
    <div class="modal-body">
        <div class="settings-item dictionary-outdated-notification" hidden><div class="settings-item-children danger-text">
            This dictionary is outdated and may not support new extension features.
            Re-import the dictionary to enable support for the latest features.
        </div></div>
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Prefix wildcard searches supported
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" class="dictionary-prefix-wildcard-searches-supported" disabled><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                <p class="warning-text">
                    Changing this value requires the dictionary to be re-imported.
                </p>
                <p><a tabindex="0" class="more-toggle" data-parent-distance="3">Hide&hellip;</a></p>
            </div>
        </div>
        <div class="settings-item dictionary-parts-of-speech-filter-setting" hidden>
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Part of speech filtering
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" class="dictionary-parts-of-speech-filter-toggle"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                When deinflecting words, only dictionary entries whose POS matches that expected by the deinflector will be shown.
                <p><a tabindex="0" class="more-toggle" data-parent-distance="3">Hide&hellip;</a></p>
            </div>
        </div>
        <div class="settings-item dictionary-use-deinflections-setting" hidden>
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        Use deinflections
                        <a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
                    </div>
                </div>
                <div class="settings-item-right">
                    <label class="toggle"><input type="checkbox" class="dictionary-use-deinflections-toggle"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
                </div>
            </div>
            <div class="settings-item-children more" hidden>
                Deinflections from this dictionary will be used.
                <p><a tabindex="0" class="more-toggle" data-parent-distance="3">Hide&hellip;</a></p>
            </div>
        </div>
        <hr>
        <div class="settings-item"><div class="settings-item-children">
            <div class="dictionary-details-table"></div>
            <div class="dictionary-counts"></div>
        </div></div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="dictionary-extra-data-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">
            <strong class="dictionary-title">Unassociated Data</strong> <span class="light dictionary-total-count"></span>
        </div>
    </div>
    <div class="modal-body">
        <p class="warning-text">
            The database contains extra data which is not associated with any installed dictionary.
            Purging the database can fix this issue.
        </p>
        <div class="dictionary-counts"></div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="dictionary-move-location-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Move Dictionary Options</div></div>
    <div class="modal-body">
        <p>Input the location the dictionary <strong class="dictionary-title"></strong> should be moved to:</p>
        <div class="margin-above">
            <input type="number" id="dictionary-move-location" min="1" step="1">
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" data-modal-action="hide" id="dictionary-move-button">Move</button>
    </div>
</div></div>


<!-- Custom CSS modal -->
<div id="custom-css-modal" class="modal modal-left" tabindex="-1" role="dialog" hidden><div class="modal-content-container1">
    <div class="modal-content-container2 modal-content-dimmer"><div class="modal-content">
        <div class="modal-header">
            <div class="modal-title">Custom CSS</div>
            <div class="modal-header-button-container">
                <div class="modal-header-button-group">
                    <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                    <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
                </div>
            </div>
        </div>
        <div class="modal-body custom-popup-css-container">
            <div class="custom-popup-css-header">Popup CSS</div>
            <textarea class="no-wrap" autocomplete="off" spellcheck="false" id="custom-popup-css" data-setting="general.customPopupCss" data-tab-action="indent,4"></textarea>
            <div class="custom-popup-css-header margin-above">Popup outer CSS</div>
            <textarea class="no-wrap" autocomplete="off" spellcheck="false" id="custom-popup-outer-css" data-setting="general.customPopupOuterCss" data-tab-action="indent,4"></textarea>
        </div>
        <div class="modal-footer">
            <button type="button" data-modal-action="hide">Close</button>
        </div>
    </div></div>
    <div class="modal-content-container1-fade"></div>
</div></div>


<!-- Audio sources modal -->
<div id="audio-sources-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Audio Sources</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">
                        When searching for audio, the sources are checked in order until the first
                        valid source is found. This allows for selecting a fallback source if the
                        first choice is not available.
                    </div>
                </div>
            </div>
            <div class="settings-item-children">
                <div id="audio-source-list" class="generic-list"></div>
                <div id="audio-source-list-empty">
                    No audio sources enabled
                </div>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" id="audio-source-add" class="low-emphasis">Add</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="audio-source-help-custom-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header">
        <div class="modal-title">Audio Source - Custom URL</div>
    </div>
    <div class="modal-body">
        <p>
            A custom URL can be used to play audio from any URL.
            The replacement tags <code data-select-on-click="">{term}</code> and <code data-select-on-click="">{reading}</code>
            can be used to specify which term and reading is being looked up.<br>
        </p>
        <p>
            Example:<br>
            <a tabindex="0" data-select-on-click="">http://localhost/audio.mp3?term={term}&amp;reading={reading}</a>
        </p>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="audio-source-help-custom-json-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header">
        <div class="modal-title">Audio Source - Custom URL (JSON)</div>
    </div>
    <div class="modal-body">
        <p>
            A custom URL to a JSON file which lists one or more audio URLs for a given term.
            The format of the JSON file is described in <a href="/data/schemas/custom-audio-list-schema.json" target="_blank" rel="noopener noreferrer">this schema file</a>.
        </p>
        <p>
            Example:<br>
            <a tabindex="0" data-select-on-click="">http://localhost/audio.json?term={term}&amp;reading={reading}</a>
        </p>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="audio-source-help-text-to-speech-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header">
        <div class="modal-title">Audio Source - Text-to-speech</div>
    </div>
    <div class="modal-body">
        <p>
            A synthesized voice will speak the given text, using either the term text or the reading.
        </p>
        <div class="horizontal-flex margin-above">
            <input type="text" value="よみたん" id="text-to-speech-voice-test-text" autocomplete="off" lang="ja">
            <button type="button" id="text-to-speech-voice-test">Test</button>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>


<!-- Scanning inputs modal -->
<div id="scanning-inputs-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Scanning Inputs</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div>
            <p>
                Scanning inputs are used to define when text scanning should occur.
                <a tabindex="0" class="more-toggle more-only" data-parent-distance="2">More&hellip;</a>
            </p>
            <div class="margin-above more" hidden>
                <p>
                    Text scanning is performed when a pointer is moved and certain inputs are either pressed or not pressed.
                    The <em>Required inputs</em> field is used to define which inputs <em>must</em> be pressed, and
                    the <em>Excluded inputs</em> field is used to define which inputs <em>must not</em> be pressed.
                    If the <em>Required inputs</em> field is empty, text will be scanned whenever the pointer is moved.
                </p>
                <p>
                    The <em>Input types</em> group is used to define which types of pointer input that the
                    keyboard and button inputs are applied to.
                    Supported pointer types include the mouse cursor, touchscreen touches, and pen devices.
                    When using the <em>Pen</em> option, the defined inputs will correspond to buttons on the pen device.
                </p>
                <p>
                    Some additional scanning and search options can be configured by clicking the menu button and selecting
                    <em>Show advanced options</em>.
                </p>
                <ul>
                    <li>To assign keyboard keys, select the input field and press modifier keys on the keyboard.</li>
                    <li>To assign mouse or pen buttons, click on the button with the mouse icon using the desired button.</li>
                    <li>
                        To clear inputs, select the input field and press the <em>Escape</em> button,
                        or use the <em>Clear inputs</em> menu option.
                    </li>
                </ul>
                <p><a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a></p>
            </div>
        </div>
        <div class="scan-input-list generic-list margin-above" id="scan-input-list"></div>
        <div class="warning-text margin-above generic-list-empty-indicator">
            No scanning inputs have been defined yet.
            Click the <em>Add</em> button to add a new input.
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" id="scan-input-add">Add</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>


<!-- Input action prevention modal -->
<div id="input-action-prevention-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Input Action Prevention</div></div>
    <div class="modal-body">
        <div>
            Prevent middle mouse button actions on:
            <a tabindex="0" class="more-toggle more-only" data-parent-distance="2">(?)</a>
        </div>
        <div class="more" hidden>
            <p>
                This option is used to disable the default action of the middle mouse button in different contexts.
                This can be useful for preventing the scroll action that the middle mouse button is typically mapped to,
                which is otherwise difficult to disable inside extension pages via other means.
            </p>
            <p>
                <a tabindex="0" class="more-toggle" data-parent-distance="3">Less&hellip;</a>
            </p>
        </div>
        <div class="input-prevention-option-list">
            <label class="input-prevention-option-list-item">
                <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onWebPages"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                <span>Webpages</span>
            </label>
            <label class="input-prevention-option-list-item">
                <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onPopupPages"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                <span>Popups</span>
            </label>
            <label class="input-prevention-option-list-item">
                <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onSearchPages"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                <span>Search page</span>
            </label>
            <label class="input-prevention-option-list-item">
                <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onSearchQuery"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
                <span>Search query</span>
            </label>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>


<!-- Anki cards modal -->
<div id="anki-cards-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Anki Cards</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div>
        <div class="tabs-container">
            <div class="tabs">
                <label class="tab">
                    <input type="radio" name="anki-card-primary-type" data-value="terms" data-anki-card-menu="anki-card-terms-field-menu" checked>
                    <div class="tab-inner"><span class="tab-label">Terms</span></div>
                </label>
                <label class="tab">
                    <input type="radio" name="anki-card-primary-type" data-value="kanji" data-anki-card-menu="anki-card-kanji-field-menu">
                    <div class="tab-inner"><span class="tab-label">Kanji</span></div>
                </label>
            </div>
            <div class="tabs-right" hidden>
                <button type="button" class="icon-button" data-menu-position="below left" id="anki-card-primary-type-menu-button"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
            </div>
        </div>
        <div class="modal-separator-line"></div>
    </div>
    <div class="modal-body anki-card" id="anki-card-primary" data-anki-card-type="terms" data-anki-card-menu="anki-card-terms-field-menu">
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Deck</div>
            </div>
            <div class="settings-item-right">
                <select class="anki-card-deck"></select>
            </div>
        </div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">Model</div>
            </div>
            <div class="settings-item-right">
                <select class="anki-card-model"></select>
            </div>
        </div></div>
        <div class="anki-card-fields">
            <div class="anki-card-field-name-header" data-persistent="true">Field</div>
            <div class="anki-card-field-input-header" data-persistent="true">Value</div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="show,anki-cards-info">Help</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="anki-cards-info-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-full">
    <div class="modal-header">
        <div class="modal-title">Anki Card Information</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <p>
            Anki card fields can be populated with information about a term or kanji character by using field markers.
            When a card is being generated, field markers are replaced with information about the term or kanji by using the installed dictionaries.
            Several preset markers are available, which are described below.
            Markers can be customized by adjusting the <a tabindex="0" data-modal-action="show,anki-card-templates">Anki card templates</a>.
        </p>
        <p>
            Anki requires the first field in a model to be unique for a card;
            therefore, it is recommended to use <code class="anki-field-marker">{expression}</code> as the marker for the first field of term cards,
            or <code class="anki-field-marker">{character}</code> for kanji cards.
        </p>
        <table class="anki-field-marker-info-table margin-above">
            <tbody>
                <tr class="anki-field-marker-info-table-heading">
                    <td>Marker (for terms)</td>
                    <td>Description</td>
                </tr>

                <tr>
                    <td><code class="anki-field-marker">{audio}</code></td>
                    <td>Audio of the term's pronunciation from one of the audio sources (if available).</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{cloze-body-kana}</code></td>
                    <td>Kana reading for <code class="anki-field-marker">{cloze-body}</code>.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{conjugation}</code></td>
                    <td>Conjugation path from the raw inflected term to the source term.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{expression}</code></td>
                    <td>Term expressed using kanji. If kanji expression is not available, kana is used.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{furigana}</code></td>
                    <td>
                        Term expressed as kanji with furigana displayed above it.
                        Example: <ruby>日本語<rt>にほんご</rt></ruby>.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{furigana-plain}</code></td>
                    <td>
                        Term expressed as kanji with furigana displayed next to it in brackets.
                        Example: 日本語[にほんご].
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{glossary}</code></td>
                    <td>List of definitions for the term.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{glossary-brief}</code></td>
                    <td>List of definitions for the term in a more compact format.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{glossary-no-dictionary}</code></td>
                    <td>List of definitions for the term, except the dictionary tag is omitted.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{glossary}</code></td>
                    <td>First definition for the term.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{glossary-brief}</code></td>
                    <td>First definition for the term in a more compact format.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{glossary-no-dictionary}</code></td>
                    <td>First definition for the term, except the dictionary tag is omitted.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{part-of-speech}</code></td>
                    <td>Part of speech information for the term.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{phonetic-transcriptions}</code></td>
                    <td>List of phonetic transcriptions for the term.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{pitch-accents}</code></td>
                    <td>List of pitch accent downstep notations for the term.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{pitch-accent-graphs}</code></td>
                    <td>List of pitch accent graphs for the term.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{pitch-accent-graphs-jj}</code></td>
                    <td>List of pitch accent graphs for the term (styled after Jidoujisho).</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{pitch-accent-positions}</code></td>
                    <td>List of accent downstep positions for the term as a number.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{pitch-accent-categories}</code></td>
                    <td>List of pitch accent categories for the term (e.g. heiban, kifuku, atamadaka, odaka, nakadaka).</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{reading}</code></td>
                    <td>Kana reading for the term, or empty for terms where the expression is the reading.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{single-glossary-DICT-NAME}</code></td>
                    <td>
                        Same as <code class="anki-field-marker">{glossary}</code>, but with entries from only a single dictionary.
                        The dictionary name will likely be modified, use the options from the ▼ dropdown.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{single-glossary-DICT-NAME-brief}</code></td>
                    <td>
                        See <code class="anki-field-marker">{single-glossary-DICT-NAME}</code> and <code class="anki-field-marker">{glossary-brief}</code>.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{single-glossary-DICT-NAME-no-dictionary}</code></td>
                    <td>
                        See <code class="anki-field-marker">{single-glossary-DICT-NAME}</code> and <code class="anki-field-marker">{glossary-no-dictionary}</code>.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{tags}</code></td>
                    <td>Grammar and usage tags providing information about the term.</td>
                </tr>

                <tr class="anki-field-marker-info-table-heading">
                    <td>Marker (for kanji)</td>
                    <td>Description</td>
                </tr>

                <tr>
                    <td><code class="anki-field-marker">{character}</code></td>
                    <td>Unicode glyph representing the current kanji.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{glossary}</code></td>
                    <td>List of definitions for the kanji.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{kunyomi}</code></td>
                    <td>Kunyomi (Japanese reading) for the kanji, expressed as katakana.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{onyomi}</code></td>
                    <td>Onyomi (Chinese reading) for the kanji, expressed as hiragana.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{stroke-count}</code></td>
                    <td>Number of strokes that the kanji character has.</td>
                </tr>

                <tr class="anki-field-marker-info-table-heading">
                    <td>Marker (for both)</td>
                    <td>Description</td>
                </tr>

                <tr>
                    <td><code class="anki-field-marker">{clipboard-image}</code></td>
                    <td>An image which is stored in the system clipboard, if available.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{clipboard-text}</code></td>
                    <td>Text which is stored in the system clipboard, if available.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{cloze-body}</code></td>
                    <td>Original inflected term as it appeared before being reduced to dictionary form by Yomitan.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{cloze-prefix}</code></td>
                    <td>Fragment of the containing <code class="anki-field-marker">{sentence}</code> starting at the beginning of <code class="anki-field-marker">{sentence}</code> until the beginning of <code class="anki-field-marker">{cloze-body}</code>.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{cloze-suffix}</code></td>
                    <td>Fragment of the containing <code class="anki-field-marker">{sentence}</code> starting at the end of <code class="anki-field-marker">{cloze-body}</code> until the end of <code class="anki-field-marker">{sentence}</code>.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{dictionary}</code></td>
                    <td>Name of the dictionary from which the card is being created.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{document-title}</code></td>
                    <td>Title of the web page that the term or kanji appeared in.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{frequencies}</code></td>
                    <td>
                        Frequency information for the term or kanji.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{frequency-harmonic-rank}</code></td>
                    <td>
                        The harmonic mean of frequency data for the current term or kanji.<br>
                        Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term or kanji usage.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{frequency-harmonic-occurrence}</code></td>
                    <td>
                        The harmonic mean of frequency data for the current term or kanji.<br>
                        Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term or kanji usage.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{frequency-average-rank}</code></td>
                    <td>
                        The average of frequency data for the current term or kanji.<br>
                        Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term or kanji usage.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{frequency-average-occurrence}</code></td>
                    <td>
                        The average of frequency data for the current term or kanji.<br>
                        Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term or kanji usage.
                    </td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{screenshot}</code></td>
                    <td>Screenshot of the web page taken at the time the term or kanji was added.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{search-query}</code></td>
                    <td>The full search query shown on the search page.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{selection-text}</code></td>
                    <td>The selected text on the search page or popup.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{sentence}</code></td>
                    <td>Sentence, quote, or phrase that the term or kanji appears in from the source content.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{sentence-furigana}</code></td>
                    <td>Sentence, quote, or phrase that the term or kanji appears in from the source content, with furigana added.</td>
                </tr>
                <tr>
                    <td><code class="anki-field-marker">{url}</code></td>
                    <td>Address of the web page in which the term or kanji appeared in.</td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="modal-footer">
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>


<!-- Anki field template modals -->
<div id="anki-card-templates-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-full">
    <div class="modal-header"><div class="modal-title">Anki Card Templates</div></div>
    <div class="modal-body anki-card-templates-layout">
        <div class="anki-card-templates-info">
            <p>
                Anki card fields are formatted using the <a href="https://handlebarsjs.com/" target="_blank" rel="noopener noreferrer">Handlebars.js</a>
                template rendering engine.
                Advanced users can modify these templates for full control over what information is included in Anki cards.
            </p>
            <p>
                Consider copy-pasting the source into a code editor that supports syntax highlighting for easier editing.
            </p>
        </div>
        <textarea autocomplete="off" spellcheck="false" id="anki-card-templates-textarea" class="no-wrap margin-above" data-tab-action="indent,4"></textarea>
        <div id="anki-card-templates-compile-result" class="code danger-text margin-above" hidden></div>
        <div class="anki-card-templates-test-container margin-above">
            <p>
                Card templates can be tested using the inputs below.
            </p>
            <div class="anki-card-templates-test-table margin-above">
                <div class="anki-card-templates-test-table-header">Scanned text</div>
                <div class="anki-card-templates-test-table-header">Card field</div>
                <div></div>
                <input type="text" id="anki-card-templates-test-text-input" class="form-control" value="読め" placeholder="Preview text" autocomplete="off" lang="ja">
                <div class="anki-card-templates-test-input-container input-group">
                    <input type="text" id="anki-card-templates-test-field-input" value="{expression}" placeholder="{marker}" autocomplete="off" spellcheck="false">
                    <button type="button" class="input-suffix input-suffix-icon-button light-icon" id="anki-card-templates-test-field-menu-button" data-menu="anki-card-all-field-menu" data-menu-position="below left"><span class="icon" data-icon="material-down-arrow"></span></button>
                </div>
                <button type="button" id="anki-card-templates-test-render-button">Test</button>
            </div>
        </div>
        <div class="code margin-above" id="anki-card-templates-render-result"><em>Card render result</em></div>
    </div>
    <div class="modal-footer">
        <button type="button" class="danger" id="anki-card-templates-reset-button">Reset Templates</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="anki-card-templates-reset-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Reset Anki Card Templates</div></div>
    <div class="modal-body">
        <p class="danger-text">
            Are you sure you want to reset the card templates to their default value?
            Any changes you made will be lost.
        </p>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" class="danger" id="anki-card-templates-reset-button-confirm">Reset Templates</button>
    </div>
</div></div>

<!-- Generate anki deck modal -->
<div id="generate-anki-notes-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-full">
    <div class="modal-header"><div class="modal-title">Anki Note Generator</div></div>
    <div class="modal-body generate-anki-notes-layout">
        <div class="generate-anki-notes-info">
            <p class="warning-text">
                WARNING: This feature is experimental!
            </p>
            <p>
                Enter a newline separated list of terms below to send notes directly to an Anki deck or export to an Anki deck file in <code>Notes in plain text (.txt)</code> format.
            </p>
            <p>
                For more information check the <a href="https://github.com/themoeway/yomitan/blob/master/docs/anki-integration.md#anki-note-generation">documentation</a>.
            </p>
        </div>
        <textarea autocomplete="off" spellcheck="false" id="generate-anki-notes-textarea" class="no-wrap margin-above" data-tab-action="indent,4"></textarea>
        <div class="generate-anki-notes-test-container margin-above">
            <p>
                Active Anki deck: <code id="generate-anki-notes-active-deck"></code><br>
                Active Anki model: <code id="generate-anki-notes-active-model"></code>
            </p>
            <div class="generate-anki-notes-test-table margin-above">
                <div class="generate-anki-notes-test-table-header">Test word</div>
                <div></div>
                <input type="text" id="generate-anki-notes-test-text-input" class="form-control" value="読め" placeholder="Preview text" autocomplete="off" lang="ja">
                <button type="button" id="generate-anki-notes-test-render-button">Preview Card</button>
            </div>
        </div>
        <div class="code margin-above" id="generate-anki-notes-render-result"><em>Card render result</em></div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" id="generate-anki-notes-send-to-anki-button">Send to Anki</button>
        <button type="button" class="low-emphasis" id="generate-anki-notes-export-button">Export to File</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="generate-anki-notes-send-to-anki-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Send Notes to Anki</div></div>
    <div class="modal-body">
        <p>
            Are you sure you want to send <strong id="generate-anki-notes-send-wordcount"></strong> terms to <code id="generate-anki-notes-active-deck-confirm"></code>? This action cannot be undone.
        </p>
        <div class="settings-item margin-above"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    Add media to notes
                </div>
                <div class="settings-item-description">
                    Adding media increases processing time.
                </div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" id="generate-anki-notes-add-media"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item margin-above"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    Prevent sending duplicate notes
                </div>
                <div class="settings-item-description">
                    Checking for duplicates increases processing time.
                </div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" id="generate-anki-notes-disallow-duplicates"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
    </div>
    <div class="modal-body-addon generate-anki-notes-progress" hidden>
        <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
        <div class="progress-bar-track"><div class="progress-bar"></div></div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide" id="generate-anki-notes-send-to-anki-cancel-button">Cancel</button>
        <button type="button" class="danger" id="generate-anki-notes-send-button-confirm">Send to Anki</button>
    </div>
</div></div>

<div id="generate-anki-notes-export-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Export Notes to File</div></div>
    <div class="modal-body">
        <p>
            Are you sure you want to export <strong id="generate-anki-notes-export-wordcount"></strong> terms to <code>Notes in plain text (.txt)</code> format?
        </p>
    </div>
    <div class="modal-body-addon generate-anki-notes-progress" hidden>
        <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
        <div class="progress-bar-track"><div class="progress-bar"></div></div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide" id="generate-anki-notes-export-cancel-button">Cancel</button>
        <button type="button" class="danger" id="generate-anki-notes-export-button-confirm">Export to File</button>
    </div>
</div></div>


<!-- Import/export modals -->
<div id="settings-import-error-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Import Error</div></div>
    <div class="modal-body">
        <p>An error occurred while trying to import the settings file:</p>
        <p class="danger-text" id="settings-import-error-message"></p>
        <p>Additional info can be found in the developer console.</p>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="settings-import-warning-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Import Security Warning</div></div>
    <div class="modal-body">
        <p>
            Settings file contains settings which may pose a security risk.
            Only import settings from sources you trust.
        </p>
        <ul class="danger-text" id="settings-import-warning-message"></ul>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" class="danger settings-import-warning-import-button">Import</button>
        <button type="button" class="settings-import-warning-import-button" data-import-sanitize="true">Sanitize and Import</button>
    </div>
</div></div>

<div id="settings-reset-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Reset Settings</div></div>
    <div class="modal-body">
        <p class="danger-text">
            You are about to reset all Yomitan settings back to their default values.
            This will delete all custom profiles you may have created.
            <strong>This action cannot be undone.</strong>
        </p>
        <p>
            Consider making a backup using the <em>Export Settings</em> button before resetting
            if you want to be able to revert.
        </p>
        <p>
            Dictionary data will not be deleted, but any installed dictionaries
            will need to be re-enabled.
        </p>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" class="danger" id="settings-reset-confirm-button">Reset All Settings</button>
    </div>
</div></div>


<!-- Translation modals -->
<div id="translation-text-replacement-patterns-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Custom Text Replacement Patterns</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
            Text replacement patterns are used to modify or remove text that matches certain patterns.
            Patterns are defined using
            <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions" target="_blank" rel="noreferrer noopener">regular expression syntax</a>,
            and the replacement text can use certain
            <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter" target="_blank" rel="noreferrer noopener">special replacement patterns</a>.
        </div></div></div></div>
        <div class="settings-item"><div class="settings-item-inner">
            <div class="settings-item-left">
                <div class="settings-item-label">
                    Search original text
                </div>
                <div class="settings-item-description">
                    The original unmodified text will also be searched for definitions.
                </div>
            </div>
            <div class="settings-item-right">
                <label class="toggle"><input type="checkbox" data-setting="translation.textReplacements.searchOriginal"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
            </div>
        </div></div>
        <div class="settings-item">
            <div class="settings-item-inner">
                <div class="settings-item-left">
                    <div class="settings-item-label">Text replacement patterns</div>
                </div>
            </div>
            <div class="settings-item-children">
                <div id="translation-text-replacement-list" class="generic-list"></div>
                <div class="generic-list-empty-indicator"><em>None defined</em></div>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" id="translation-text-replacement-add" class="low-emphasis">Add</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>


<!-- Sentence parsing modal -->
<div id="sentence-termination-characters-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Sentence Termination Characters</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <p>
            Sentences are terminated by punctuation and quotation marks, which can both be configured below.
        </p>
        <table class="sentence-termination-character-list-table" id="sentence-termination-character-list-table" hidden>
            <thead><tr>
                <td>#</td>
                <td>Enabled</td>
                <td>Type</td>
                <td>Character 1</td>
                <td>Character 2</td>
                <td>Include character in sentence</td>
                <td></td>
            </tr></thead>
            <tbody class="sentence-termination-character-list generic-list" id="sentence-termination-character-list"></tbody>
        </table>
        <div id="sentence-termination-character-list-empty" hidden>
            No terminators defined.
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis danger" id="sentence-termination-character-list-reset">Reset</button>
        <button type="button" class="low-emphasis" id="sentence-termination-character-list-add">Add</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>


<!-- Keyboard shortcuts modal -->
<div id="keyboard-shortcuts-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-full">
    <div class="modal-header">
        <div class="modal-title">Keyboard Shortcuts</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div class="hotkey-list generic-list" id="hotkey-list"></div>
        <div class="hotkey-list-empty" id="hotkey-list-empty" hidden>
            No keyboard shortcuts defined.
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis danger" data-modal-action="show,keyboard-shortcuts-reset">Reset</button>
        <button type="button" class="low-emphasis" id="hotkey-list-add">Add</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="extension-keyboard-shortcuts-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
    <div class="modal-header">
        <div class="modal-title">Native Keyboard Shortcuts</div>
        <div class="modal-header-button-container">
            <div class="modal-header-button-group">
                <button type="button" class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
                <button type="button" class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div>
            <p data-show-for-browser="chrome edge">
                The native keyboard shortcuts are listed below,
                but cannot be configured from within the extension on this browser.
                To configure these shortcuts:
            </p>

            <p data-show-for-browser="firefox">
                The native keyboard shortcuts can be configured below on this browser,
                or by doing the following:
            </p>

            <ul data-show-for-browser="chrome">
                <li>Open <a tabindex="0" data-special-url="chrome://extensions/shortcuts">chrome://extensions/shortcuts</a> in a new tab.</li>
                <li>Find the <em>Yomitan</em> section and configure the shortcuts.</li>
            </ul>

            <ul data-show-for-browser="edge">
                <li>Open <a tabindex="0" data-special-url="edge://extensions/shortcuts">edge://extensions/shortcuts</a> in a new tab.</li>
                <li>Find the <em>Yomitan</em> section and configure the shortcuts.</li>
            </ul>

            <ul data-show-for-browser="firefox">
                <li>Open the extensions page (<a tabindex="0" data-select-on-click="">about:addons</a>)</li>
                <li>Click the button on the right with the gear icon, then click <em>Manage Extension Shortcuts</em>.</li>
                <li>Find the <em>Yomitan</em> section and configure the shortcuts.</li>
            </ul>
        </div>
        <div class="modal-separator-line"></div>
        <div class="modal-settings-group" id="extension-hotkey-list"></div>
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis danger" id="extension-hotkey-list-reset-all">Reset All</button>
        <button type="button" class="low-emphasis danger" id="extension-hotkey-list-clear-all">Clear All</button>
        <button type="button" data-modal-action="hide">Close</button>
    </div>
</div></div>

<div id="keyboard-shortcuts-reset-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
    <div class="modal-header"><div class="modal-title">Confirm Keyboard Shortcuts Reset</div></div>
    <div class="modal-body">
        Are you sure you want to reset all keyboard shortcuts to their defaults?
    </div>
    <div class="modal-footer">
        <button type="button" class="low-emphasis" data-modal-action="hide">Cancel</button>
        <button type="button" class="danger" id="hotkey-list-reset" data-modal-action="hide">Reset All</button>
    </div>
</div></div>

</body>
</html>