-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
59 lines (55 loc) · 2.55 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
<!DOCTYPE html>
<html>
<head>
<title>JS Character Count</title>
<link rel="icon" type="image/png" href="images/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Description" CONTENT="Beautiful character, word, and paragraph counter.">
<link href='https://fonts.googleapis.com/css?family=Oswald:400,700' rel='stylesheet' type='text/css'>
<link href='https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css' rel='stylesheet'>
<link href='styles/style.css' rel='stylesheet'>
</head>
<body>
<div id='wrapper'>
<div id='text-report'>
<div id='text-data'>
<div id='character-data' class='data'>
<span id='character-label' class='label'>Characters </span><span id='character-counter' class='counter'></span>
</div>
<div id='word-data' class='data'>
<span id='word-label' class='label'>Words </span><span id='word-counter' class='counter'></span>
</div>
<div id='paragraph-data' class='data'>
<span id='paragraph-label' class='label'>Paragraphs </span><span id='paragraph-counter' class='counter'></span>
</div>
<div id='social-icons'>
<a href='https://twitter.com/ryandunnewold' target='_blank'>
<span class='icon ion-social-twitter'></span>
</a>
<a href='https://github.com/ryandunnewold' target='_blank'>
<span class='icon ion-social-github'></span>
</a>
</div>
</div>
</div>
<div id='character-container' contenteditable data-placeholder='Paste text here'></div>
</div>
<script src="js/countable.js"></script>
<script type='text/javascript'>
var area = document.getElementById('character-container')
Countable.live(area, function (counter) {
document.getElementById('character-counter').innerHTML = counter.characters
document.getElementById('word-counter').innerHTML = counter.words
document.getElementById('paragraph-counter').innerHTML = counter.paragraphs
})
</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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-64928542-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>