Created
December 18, 2015 10:22
-
-
Save JavaScript-Packer/ac314caffc28ab0be512 to your computer and use it in GitHub Desktop.
Character counter I threw together so I can see exactly how many chars are used in a chunk of text data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <head><title>Character Counter</title></head><body onclick="whak();"> | |
| <h1><a href="http://www.whak.ca">WHAK.ca</a>'s Character Counter</h1> | |
| <textarea onkeyup="whak();" oninput="whak();" onchange="whak();" onfocus="whak();" onscroll="whak();" onclick="whak();" onkeydown="whak();" | |
| id="whak" width="728" height="450" ondblclick="whak();" style="width:728px;height:300px" | |
| placeholder="Type here to find out how many characters are used. You can also paste a clump of text in this box. www.ScriptCompress.com" | |
| onmouseover="whak();this.select()"></textarea> | |
| <h1 id="count"></h1> | |
| <script> | |
| function whak() { | |
| function n(n) { | |
| return n = new Date(), n.toISOString(); | |
| } | |
| document.getElementById("count").innerHTML = document.getElementById("whak").value.length + " characters! " + n(); | |
| } | |
| </script> | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment