|
30 | 30 | </head>
|
31 | 31 | <body>
|
32 | 32 | <div class="center">
|
33 |
| - <header> |
34 | 33 | <div class="title">🌊나이스(NEIS) 글자수 계산기</div>
|
35 |
| - <button id="spellcheck_button">맞춤법 검사하기</button> |
36 |
| - </header> |
37 | 34 | <div class="title_underbar_wrapper">
|
38 | 35 | <div class="title_underbar"></div>
|
39 | 36 | </div>
|
40 |
| - <spell-check-input id="counter" class="counter"></spell-check-input> |
| 37 | + <textarea id="counter" class="counter" cols="40" rows="5"></textarea> |
41 | 38 | <table>
|
42 | 39 | <tr>
|
43 | 40 | <th>항목</td>
|
|
57 | 54 | </tr>
|
58 | 55 | </table>
|
59 | 56 | <div id="result" class="result">공백 제외 0자, 공백 포함 0자, 0바이트</div>
|
60 |
| - <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> |
| 57 | + <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> |
61 | 58 | </div>
|
62 | 59 | <div class="footbar">
|
63 | 60 | <div class="footbar_content">
|
64 | 61 | <span>👨💻 by <a href="https://github.com/hjh010501">kidevelop</a></span>
|
65 | 62 | <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>
|
66 | 63 | </div>
|
67 | 64 | </div>
|
68 |
| - <script type="module" src="./spellchecker/index.js"></script> |
69 | 65 | <script>
|
70 | 66 | const textarea = document.getElementById("counter");
|
71 |
| - const spellCheckButton = document.getElementById("spellcheck_button") |
72 | 67 |
|
73 | 68 | function init() {
|
74 | 69 | let content = localStorage.getItem("save");
|
75 | 70 |
|
76 | 71 | if(content) {
|
77 | 72 | counter(content);
|
78 |
| - textarea.setContent(content); |
| 73 | + document.getElementById('counter').value = content; |
79 | 74 | }
|
80 | 75 |
|
81 |
| - textarea.addEventListener("content-change", function(e) { |
82 |
| - counter(e.detail.content); |
83 |
| - }); |
84 |
| - |
85 |
| - spellCheckButton.addEventListener("click", function() { |
86 |
| - spellCheckButton.classList.add("pending") |
87 |
| - textarea.spellCheck().finally(() => spellCheckButton.classList.remove("pending")); |
| 76 | + textarea.addEventListener("input", function(e) { |
| 77 | + counter(e.target.value); |
88 | 78 | });
|
89 | 79 | }
|
90 | 80 |
|
|
0 commit comments