-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.html
111 lines (102 loc) Β· 7.4 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
<html lang="ko">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<meta name="description" content="λμ΄μ€(NEIS) κΈμμ κ³μ°κΈ°">
<meta property="og:title" content="λμ΄μ€(NEIS) κΈμμ κ³μ°κΈ°">
<meta property="og:type" content="website">
<meta property="og:url" content="https://hjh010501.github.io/neis-counter">
<meta property="og:locale" content="ko_KR">
<meta property="og:description" content="λμ΄μ€(NEIS) κΈμμ κ³μ°κΈ°">
<meta property="og:image" content="ogimage.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<link rel="stylesheet" type="text/css" href="main.css">
<script async defer src="https://buttons.github.io/buttons.js"></script>
<title>λμ΄μ€(NEIS) κΈμμ κ³μ°κΈ°</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-145929593-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-145929593-1');
</script>
</head>
<body>
<div class="center">
<div class="title">πλμ΄μ€(NEIS) κΈμμ κ³μ°κΈ°</div>
<div class="title_underbar_wrapper">
<div class="title_underbar"></div>
</div>
<textarea id="counter" class="counter" cols="40" rows="5"></textarea>
<table>
<tr>
<th>νλͺ©</td>
<th>μμ¨νλ</th>
<th>λμ리νλ</th>
<th>μ§λ‘νλ</th>
<th>κ΅κ³ΌμΈνΉ</th>
<th>κ°μΈλ³μΈνΉ</th>
</tr>
<tr>
<td>λ°μ΄νΈ</td>
<td>1500Bytes</td>
<td>1500Bytes</td>
<td>2100Bytes</td>
<td>1500Bytes</td>
<td>1500Bytes</td>
</tr>
</table>
<div id="result" class="result">곡백 μ μΈ 0μ, 곡백 ν¬ν¨ 0μ, 0λ°μ΄νΈ</div>
<span class="info">μμ΄, μ«μ, νΉμλ¬Έμ, λμ΄μ°κΈ°, μν°ν€ 1λ°μ΄νΈ / νκΈ 3λ°μ΄νΈ<br>λ³κ²½μ¬νμ΄ μλ€λ©΄ κ°λ°μ μ΄λ©μΌλ‘ μ°λ½μ£Όμλ©΄ κ°μ¬νκ² μ΅λλ€.<br class="small-screen">λ°μν΄μ£Όμ λΆλ€: <a href="https://github.com/Dongyeongkim" target="_blank">κΉλμ</a>, <a href="https://github.com/rycont" target="_blank">μ ν(Rycont)</a>, <a href="https://github.com/cokia" target="_blank">νμ°μ</a>, <a href="https://github.com/hajin-chung" target="_blank">μ νμ§</a>, <a href="https://github.com/bshyuunn" target="_blank">λ°°μ‘ν</a>, <a href="https://github.com/mcgun1234" target="_blank">μ΅μν</a>, <a href="https://github.com/b0u0b-0w0" target="_blank">κΉμμ§</a>, <a href="https://github.com/jjoonleo" target="_blank">λ°μ΄μ€</a><br><br><a href="https://hjh010501.github.io/neis-counter/"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fhjh010501.github.io%2Fneis-counter%2F&count_bg=%23000000&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=%EB%B0%A9%EB%AC%B8%EC%9E%90+%EC%88%98&edge_flat=true"/></a></span>
</div>
<div class="footbar">
<div class="footbar_content">
<span>π¨βπ» by <a href="https://github.com/hjh010501">kidevelop</a></span>
<span><a class="github-button" href="https://github.com/hjh010501/neis-counter" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star hjh010501/neis-counter on GitHub">Star</a></span>
</div>
<div style="height: 50px;"></div>
<center>
<iframe src="https://ads-partners.coupang.com/widgets.html?id=822305&template=carousel&trackingCode=AF9670799&subId=&width=680&height=140&tsource=" width="680" height="140" frameborder="0" scrolling="no" referrerpolicy="unsafe-url" browsingtopics></iframe>
<br/>
"μ΄ ν¬μ€ν
μ μΏ ν‘ ννΈλμ€ νλμ μΌνμΌλ‘, μ΄μ λ°λ₯Έ μΌμ μ‘μ μμλ£λ₯Ό μ 곡λ°μ΅λλ€."
</center>
<div style="height: 50px;"></div>
</div>
<script>
const textarea = document.getElementById("counter");
function init() {
let content = localStorage.getItem("save");
if(content) {
counter(content);
document.getElementById('counter').value = content;
}
textarea.addEventListener("input", function(e) {
counter(e.target.value);
});
}
function counter(content) {
if (content == "\n" && content.startsWith('\n')) {
content = content.slice(1);
}
if (content != "\n" && content.endsWith('\n')) {
content = content.slice(0, -1);
}
localStorage.setItem("save", content);
var english = content.replace(/[γ±-γ
|γ
-γ
£|κ°-ν£]/gi, "").replace(/[0-9]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/\s/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/β|β|β|β/g, "");
var korean = content.replace(/[a-zA-Z]/gi, "").replace(/[0-9]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/β|β|β|β/g, "");
var number = content.replace(/[a-zA-Z]/gi, "").replace(/[γ±-γ
|γ
-γ
£|κ°-ν£]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/β|β|β|β/g, "");
var onebyte_special = content.replace(/[a-zA-Z]/gi, "").replace(/[γ±-γ
|γ
-γ
£|κ°-ν£]/gi, "").replace(/[0-9]/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/β|β|β|β/g, "");
var threebyte_special = content.replace(/[a-zA-Z]/gi, "").replace(/[γ±-γ
|γ
-γ
£|κ°-ν£]/gi, "").replace(/[0-9]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"");
var space = content.replace(/[a-zA-Z]/gi, "").replace(/[γ±-γ
|γ
-γ
£|κ°-ν£]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/[0-9]/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/β|β|β|β/g, "");
var line = content.replace(/[a-zA-Z]/gi, "").replace(/[γ±-γ
|γ
-γ
£|κ°-ν£]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/[0-9]/gi, "").replace(/ /gi, "").replace(/β|β|β|β/g, "");
var result = english.length + (korean.length * 3) + number.length + onebyte_special.length + (threebyte_special.length * 3) + space.length + line.length;
document.getElementById('result').innerHTML = "곡백 μ μΈ " + content.replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/ /gi, "").length + "μ, 곡백 ν¬ν¨ " + content.length + "μ, " + result + "λ°μ΄νΈ";
}
window.onload = init;
</script>
</body>
</html>