-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
911 lines (685 loc) · 28.3 KB
/
index.html
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
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="utf-8" />
<title>異世界文字編輯器</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
<!--
<script src="js/sample.js"></script>
<link rel="stylesheet" href="css/samples.css">
<link rel="stylesheet" href="toolbarconfigurator/lib/codemirror/neo.css">
-->
<script type="text/javascript" async="" src="html2canvas.js"></script>
<!--<script type="text/javascript" src="ckeditor/ckeditor.js"></script>-->
<!--字體-->
<style type="text/css">
@font-face {
font-family: 'Konosuba';
src: url('font/Konosuba.ttf');
}
@font-face {
font-family: 'KonosubaCube';
src: url('font/KonosubaCube.ttf');
}
</style>
<style type="text/css">
html, body {
margin: 0px;
padding: 0px;
}
html {
background-color: rgb(213, 213, 213);
}
body {
text-align: center;
color: rgb(25, 25, 25);
margin: 5px;
}
.title {
background-color: rgb(0, 0, 0);
margin: -5px;
font-family: "微軟正黑體";
}
.title h1 {
margin: 0px;
color: #FFF;
font-size: 24px;
padding: 10px;
}
#center {
margin: 10px 3px;
padding: 10px;
font-size: 30px;
position: relative;
display: inline-block;
background-image: url(imgs/b.jpg);
box-shadow: 0px 0px 20px rgba(0,0,0,0.85);
}
.edit {
font-family: "Konosuba";
min-height: 100px;
margin: 40px;
z-index: 500;
min-width: 100px;
text-align: left;
/*文字強制斷行*/
/*word-wrap: break-word;*/
/*word-break: break-all;*/
}
.edit:focus {
outline: 3px #0094ff solid;
}
/*圖片透明度*/
.edit img {
opacity: 0.7;
}
hr {
height: 3px;
border: none;
background-color: rgb(78, 78, 78);
}
/*角落裝飾*/
.d_l_t, .d_l_b, .d_r_b, .d_r_t {
width: 150px;
height: 150px;
/*background-image: url(imgs/z.png);
background-size: 100% 100%;*/
position: absolute;
pointer-events: none;
}
.d_l_t {
top: 15px;
left: 15px;
}
.d_l_b {
left: 15px;
bottom: 15px;
transform: rotate(270deg);
}
.d_r_b {
right: 15px;
bottom: 15px;
transform: rotate(180deg);
}
.d_r_t {
right: 15px;
top: 15px;
transform: rotate(90deg);
}
#b3 {
position: absolute;
z-index: 999;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
pointer-events: none;
background-image: url(imgs/b3.png);
/*background-size: 1024px 1024px;*/
/*background-attachment: fixed;*/ /*固定位置*/
}
#border {
position: absolute;
z-index: 998;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
margin: 0px;
border: 2px solid rgb(78, 78, 78);
margin: 10px;
pointer-events: none;
}
.saveing {
position: fixed !important;
top: 0px !important;
left: 0px !important;
margin: 0px !important;
}
#can {
width: 0px;
height: 0px;
position: fixed;
top: -10px;
left: -10px;
}
#img_output {
width: 90%;
margin: auto;
}
.but {
font-size: 20px;
font-weight: 900;
margin: 5px 5px 5px 0px;
padding: 0px 10px;
background-color: rgb(0, 177, 255);
color: #fff;
display: inline-block;
height: 40px;
line-height: 40px;
font-family: "微軟正黑體";
/*禁止選取*/
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.but:hover {
background-color: rgb(0, 125, 196) !important;
}
.but:active {
transform: scale(1.03);
background-color: rgb(0, 196, 136);
}
input[type=checkbox] {
transform: scale(1.5);
}
.box {
background-color: rgba(255, 255, 255, 1);
margin: auto;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.35);
border-radius: 3px;
padding: 5px;
max-width: 900px;
text-align: left;
font-family: "微軟正黑體";
}
.box h2 {
margin: 0px;
margin-bottom: 10px;
font-size: 24px;
margin-left: 0px;
}
#div_loading {
background-color: rgba(0, 0, 0, 0.2);
position: fixed;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
margin: auto;
z-index: 81000;
}
#div_loading_t {
background-color: rgba(0, 167, 39, 0.66);
height: 80px;
text-align: center;
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
margin: auto;
font-family: "微軟正黑體";
font-size: 30px;
line-height: 80px;
color: #FFF;
}
input[type=range] {
width: 100px;
}
label {
/*禁止選取*/
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
<!--輸出時隱藏表格框線-->
<style id="css_table_none">
</style>
<script type="text/javascript">
///
///
///
window.addEventListener("load", function () {
///
/// 圖片輸出完成後自動計算size
///
document.getElementById("img_output").onload = function () {
var x = "size : ( " + this.naturalWidth + " , " + this.naturalHeight + " )";
document.getElementById("div_img_size").innerHTML = x;
};
});
///
///
///
function fun_save_img() {
//設定檔名
var d = new Date();
var name = d.getFullYear() + "-" +
("00" + (d.getMonth() + 1)).slice(-2) + "-" +
("00" + d.getDate()).slice(-2) + " " +
("00" + d.getHours()).slice(-2) + "-"
+ ("00" + d.getMinutes()).slice(-2) + "-"
+ ("00" + d.getSeconds()).slice(-2);
name += ".jpg";
document.getElementById("a_download").setAttribute("download", name);
document.getElementById("a_download").href = document.getElementById("img_output").src;
document.getElementById("a_download").click();
}
///
///
///
function fun_隱藏表格框線(bool_) {
if (bool_) {
document.getElementById("css_table_none").innerHTML =
".cke_show_borders table.cke_show_border, .cke_show_borders table.cke_show_border > tr > td," +
".cke_show_borders table.cke_show_border > tr > th, .cke_show_borders table.cke_show_border > tbody > tr > td," +
".cke_show_borders table.cke_show_border > tbody > tr > th, .cke_show_borders table.cke_show_border > thead > tr > td," +
".cke_show_borders table.cke_show_border > thead > tr > th, .cke_show_borders table.cke_show_border > tfoot > tr > td," +
".cke_show_borders table.cke_show_border > tfoot > tr > th {" +
" border: none !important;" +
"}"
;
} else {
document.getElementById("css_table_none").innerHTML = "";
}
}
///
///
///
function fun_截圖() {
document.getElementById("div_loading").style.display = "block";//顯示【轉換中】的視窗
fun_隱藏表格框線(true);
var obj_center = document.getElementById("center");
obj_center.className = "saveing";//讓編輯區在視窗左上角,避免截圖錯誤
document.getElementById("editor1").contentEditable = false;//關閉編輯功能
var w = obj_center.offsetWidth;
var h = obj_center.offsetHeight;
//要將 canvas 的寬高設置成容器寬高的 2 倍
//var canvas = document.createElement("canvas");
var canvas = document.getElementById("can");
canvas.width = w * double_output;
canvas.height = h * double_output;
//canvas.style.width = w / 2 + "px";
//canvas.style.height = h / 2 + "px";
var context = canvas.getContext("2d");
//然後將畫布縮放,將圖像放大兩倍畫到畫布上
context.save();
context.scale(double_output, double_output);
//return;
setTimeout(function () {
html2canvas(obj_center, {
canvas: canvas,
onrendered: function (canvas) {
obj_center.className = "";//復原位置
document.getElementById("editor1").contentEditable = true;
try {
document.getElementById("img_output").src = canvas.toDataURL('image/jpeg', 0.8);
} catch (e) {
document.getElementById("img_output").src = document.getElementById("can").toDataURL();
}
fun_隱藏表格框線(false);
document.getElementById("div_loading").style.display = "none";//隱藏【轉換中】的視窗
document.getElementById("div_output").style.display = "block";//第一次執行後才顯示輸出視窗
}
});
}, 100);
}
</script>
</head>
<body>
<!--轉換中-->
<div id="div_loading" style="display:none">
<div id="div_loading_t">轉換中</div>
</div>
<!--【大標題】-->
<div class="title">
<h1>異世界文字編輯器</h1>
</div>
<br><br>
<!--【設定】區域-->
<div class="box">
<h2>設定</h2>
<label>
<input type="checkbox" id="checkbox_max_width" />
鎖定寬度
</label>
<input type="tel" id="text_max_width" value="300" style="width:80px" />
px
<div style="height:15px;"></div>
<label>
<input type="checkbox" id="checkbox_old" />
老舊效果
</label>
<div class="only_phone">
<div style="height:15px;"></div>
<label>
<input type="checkbox" id="checkbox_font_microsoft" />
微軟正黑體
</label>
</div>
<div style="height:15px;"></div>
角落裝飾大小<input type="tel" id="text_4_corner" value="150" style="width:80px" />
px
<div style="height:15px;"></div>
輸出品質:
<input type="range" id="range_output_size" min="100" max="200" step="10" value="120" />
<a id="a_output_size_value">(120%)</a>
<div class="only_phone">
<div style="height:15px;"></div>
文字大小:
<input type="range" id="range_font_size" min="10" max="90" step="10" value="20" />
<a id="a_font_size_value">(20px)</a>
</div>
</div>
<script type="text/javascript">
//4個角落
document.getElementById("text_4_corner").onkeyup = function () {
document.querySelector(".d_l_t").style.width = this.value + "px";
document.querySelector(".d_l_t").style.height = this.value + "px";
document.querySelector(".d_l_b").style.width = this.value + "px";
document.querySelector(".d_l_b").style.height = this.value + "px";
document.querySelector(".d_r_b").style.width = this.value + "px";
document.querySelector(".d_r_b").style.height = this.value + "px";
document.querySelector(".d_r_t").style.width = this.value + "px";
document.querySelector(".d_r_t").style.height = this.value + "px";
}
document.getElementById("text_4_corner").value = "150";
//鎖定寬度
var checkbox_max_width = document.getElementById("checkbox_max_width");
var text_max_width = document.getElementById("text_max_width");
function fun_鎖定寬度() {
if (checkbox_max_width.checked) {
document.getElementById("editor1").style.width = text_max_width.value + "px";
} else {
document.getElementById("editor1").style.width = "";
}
}
checkbox_max_width.onchange = fun_鎖定寬度;
text_max_width.onkeyup = fun_鎖定寬度;
checkbox_max_width.checked = false;
text_max_width.value = "400";
//啟用老舊效果
var checkbox_old = document.getElementById("checkbox_old");
checkbox_old.onchange = function () {
if (checkbox_old.checked) {
document.getElementById("b3").style.display = "block";
} else {
document.getElementById("b3").style.display = "none";
}
};
checkbox_old.checked = true;
//微軟正黑體
var checkbox_font_microsoft = document.getElementById("checkbox_font_microsoft");
checkbox_font_microsoft.onchange = function () {
if (checkbox_font_microsoft.checked) {
document.getElementById("editor1").style.fontFamily = "微軟正黑體";
} else {
document.getElementById("editor1").style.fontFamily = "";
}
};
checkbox_font_microsoft.checked = false;
//輸出品質
var double_output = 1.2;
document.getElementById("range_output_size").onchange = function () {
document.getElementById("a_output_size_value").innerHTML = "(" + this.value + "%)";
double_output = document.getElementById("range_output_size").value / 100;
};
document.getElementById("range_output_size").value = 120;
//文字大小
document.getElementById("range_font_size").onchange = function () {
document.getElementById("a_font_size_value").innerHTML = "(" + this.value + "px)";
document.getElementById("editor1").style.fontSize = this.value + "px";
var ar_span = document.getElementById("editor1").getElementsByTagName("span");
for (var i = 0; i < ar_span.length; i++) {
ar_span[i].style.fontSize = "";
}
};
document.getElementById("range_font_size").value = 20;
</script>
<!--【編輯】區域-->
<br><br>
<h2 style="margin-bottom:-20px;font-size: 24px;font-family:'微軟正黑體'">編輯區</h2>
<br>
<div class="but" style="background-color:rgb(0, 157, 109);" onclick="fun_上一步()">上一步</div>
<div class="but" style="background-color:rgb(255, 138, 79);" onclick="fun_清除格式()">移除所有格式</div>
<!--<div class="but" style="background-color:rgb(255, 138, 79);" onclick="document.execCommand('removeFormat');">移除所有格式</div>-->
<div class="but" style="background-color:rgb(255, 84, 79);" onclick="fun_清空()">清空內容</div>
<br>
<script type="text/javascript">
function fun_上一步() {
var editor = CKEDITOR.instances.editor1;//editor1 = id
editor.execCommand('undo');//
//document.execCommand('undo', false, null);
}
function fun_清空() {
var editor = CKEDITOR.instances.editor1;//editor1 = id
editor.setData("");//
}
function fun_清除格式() {
var editor = CKEDITOR.instances.editor1;//editor1 = id
//var s_html = document.getElementById('editor1').innerText;
var s_html = document.getElementById('editor1').textContent;
editor.setData(s_html);//
}
</script>
<div id="center">
<div id="editor1" class="edit" contenteditable="true">
<p style="text-align:center; font-size:36px;">
<img data-cke-saved-src="imgs/line_up.png" src="imgs/line_up.png" style="width:80%"><br>
<span style="font-size:48px;">異世界文字編輯器</span>
<br>
<img data-cke-saved-src="imgs/line_bottom.png" src="imgs/line_bottom.png" style="width:80%;margin-top:10px;margin-bottom:10px;" vspace="10">
<br>
</p><p style="text-align: center;font-size:36px;">
<img data-cke-saved-src="imgs/logo.png" src="imgs/logo.png" alt="" style="width:250px;"><br>
</p>
<table class="cke_show_border" width="698" cellspacing="1" cellpadding="1" border="0" align="center" height="172">
<tbody>
<tr>
<td style="text-align: center;">
<span style="font-size:24px;">ONAMAE</span><br>
</td>
<td style="width: 80px; text-align: center;">
<img data-cke-saved-src="imgs/-.png" src="imgs/-.png" alt="" style="width:40px;"><br>
</td>
<td style="height: 80px; width: 511px;">
<span style="font-family:微軟正黑體;">________________________________</span><br>
</td>
</tr>
<tr>
<td style="height: 80px; text-align: center;">
<span style="font-size:24px;">SEIBETSU<br>NENREI</span>
</td>
<td style="text-align: center;">
<img data-cke-saved-src="imgs/-.png" src="imgs/-.png" alt="" style="width:40px;"><br>
</td>
<td style="width: 511px;"><span style="font-family:微軟正黑體;">_____________ / /________________</span><br></td>
</tr>
</tbody>
</table><br><hr><p>
<span style="font-family:微軟正黑體;"></span>
<span style="font-size:36px;">
說明:
<br>
這裡輸入的英文與數字會轉換成對應的異世界文字<br>
電腦版點擊編輯區後就會出現進階編輯選項<br>
</span><br>
</p><hr><p>
<span style="font-family:微軟正黑體;">字型【Konosuba】</span>
<br><br>
<span style="font-family:微軟正黑體;">a~z:</span><br>abcdefgh<br>ijklmnop<br>qrstuvwx<br>yz<br><br>
<span style="font-family:微軟正黑體;">A~Z:</span><br>ABCDEFGH<br>IJKLMNOP<br>QRSTUVWX<br>YZ<br><br>
<span style="font-family:微軟正黑體;">0~9</span><br>0123456789<br>
</p><hr><p>
<span style="font-family:微軟正黑體;">字型【KonosubaCube</span>
<span style="font-family:KonosubaCube;">】<br><br></span>
<span style="font-family:微軟正黑體;">a~z:</span>
<span style="font-family:KonosubaCube;">
<br>abcdefgh<br>ijklmnop<br>qrstuvwx<br>yz<br>
</span>
<span style="font-family:KonosubaCube;"><br></span><span style="font-family:微軟正黑體;">0~9</span>
<span style="font-family:KonosubaCube;">
<br>0123456789
</span><br>
</p>
</div>
<!--4個角落-->
<img src="imgs/z.png" class="d_l_t" />
<img src="imgs/z.png" class="d_l_b" />
<img src="imgs/z.png" class="d_r_t" />
<img src="imgs/z.png" class="d_r_b" />
<!--材質-->
<div id="b3"></div>
<!--外框-->
<div id="border"></div>
</div>
<br>
<!---->
<div class="but" onclick="fun_截圖()">匯出成圖片</div>
<br><br><br><br>
<!--【輸出結果】區域-->
<div class="box" id="div_output" style="display:none;">
<h2>輸出結果</h2>
<a id="a_download"></a>
<canvas id="can"></canvas>
<div style="text-align:center">
<img id="img_output" style="margin:auto;" />
<div id="div_img_size"></div>
</div>
<br>
<div class="but" onclick="fun_save_img()" title="儲存圖片">儲存圖片</div>
<p>如果圖片無法順利儲存,請自行右鍵存圖(手機長按圖片存圖)</p>
</div>
<br><br>
<!--【說明】區域-->
<div class="box">
<h2>說明</h2>
<style>
.table_expl {
border-collapse: collapse;
border: 1px solid #fff;
}
/*水平線*/
.table_expl td {
/*border-top: 1px solid #b5b5b5;*/
border-bottom: 1px solid #cecece;
padding: 5px;
}
/*垂直線*/
.table_expl td:first-child {
border-right: 1px solid #cecece;
padding: 5px;
}
/*隱藏會後的水平線*/
.none_border td {
border-bottom: 0px solid #cecece !important;
}
</style>
<table border="0" class="table_expl">
<tr>
<td>說明</td>
<td>
可以簡單快速的將【
<a href="http://konosuba.com/" target="_blank">為美好的世界獻上祝福!(この素晴らしい世界に祝福を!)</a>
】中出現的異世界文字輸出成圖片。
<br>
</td>
</tr>
<tr>
<td>版本</td>
<td>1.1.6</td>
</tr>
<tr>
<td> 討論區</td>
<td>
<a href="https://forum.gamer.com.tw/C.php?bsn=60076&snA=3953007" target="_blank">討論區</a>
</td>
</tr>
<tr>
<td>字體作者</td>
<td>
<a href="https://home.gamer.com.tw/creationDetail.php?sn=3504010" target="_blank">mdma98765432(里繆艾萊.赫.瓦萊)</a>
</td>
</tr>
<tr>
<td>素材作者</td>
<td>
<a href="https://www.ptt.cc/bbs/C_Chat/M.1488534492.A.7F1.html" target="_blank">Yirgacrow (Yirgacrow)</a>
</td>
</tr>
<tr>
<td>網站作者</td>
<td>
<a href="https://home.gamer.com.tw/homeindex.php?owner=hbl917070" target="_blank">hbl917070(深海異音)</a>
</td>
</tr>
<tr class="none_border">
<td>對照表</td>
<td>
<a href="imgs/comparison.png" target="_blank">
<img src="imgs/comparison.png" style="max-width:100%" />
</a>
</td>
</tr>
</table>
</div>
<br><br>
<style>
#cke_editor1 {
/*display:block !important;*/
/*display: none !important;*/
position: fixed !important;
top: 10px !important;
left: 10px !important;
}
</style>
<script type="text/javascript">
///
///如果是手機,就不啟用ckeditor
///
var useragent = navigator.userAgent;
useragent = useragent.toLowerCase();
var bool_phone = useragent.indexOf('iphone') != -1 || useragent.indexOf('ipad') != -1 || useragent.indexOf('ipod') != -1 || useragent.indexOf('android') != -1;//判斷是否為手機
var bool_ie = useragent.indexOf('trident') != -1 || useragent.indexOf('msie') != -1;//判斷是否為IE
//如果是IE的話
if (bool_ie) {
alert(
"IE瀏覽器可能導致字體無法正常顯示,可以改用以下瀏覽器:" + "\n" +
" * Google Chrome" + "\n" +
" * Firefox(火狐)" + "\n" +
" * Opera" + "\n" +
" * Edge" + "\n"
);
}
if (bool_phone) {//首頁
//
//隱藏編輯選單
var style = document.createElement("style")
style.innerHTML = "#cke_editor1{display: none !important;}";
document.body.appendChild(style);
//用簡易版的ckeditor
var js = document.createElement("script")
js.src = "ckeditor_phone/ckeditor.js";
document.body.appendChild(js);
//修改預設顯示的內容
var s_html = '<span style="font-size:36px;"></span><p><span style="font-size:36px;">說明:<br>這裡輸入的英文與數字會轉換成對應的異世界文字</span><br></p><p><span style="font-family:微軟正黑體;">字型【Konosuba】</span><br><br><span style="font-family:微軟正黑體;">a~z:</span><br>abcdefgh<br>ijklmnop<br>qrstuvwx<br>yz<br><br><span style="font-family:微軟正黑體;">A~Z:</span><br>ABCDEFGH<br>IJKLMNOP<br>QRSTUVWX<br>YZ<br><br><span style="font-family:微軟正黑體;">0~9</span><br>0123456789<br></p>';
document.getElementById("editor1").innerHTML = s_html;
} else {//電腦
//啟用完整版的ckeditor
var js = document.createElement("script")
js.src = "ckeditor/ckeditor.js";
document.body.appendChild(js);
//隱藏只有手機才需要的功能
var style = document.createElement("style")
style.innerHTML = ".only_phone{display:none;}";
document.body.appendChild(style);
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-56186804-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>