-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
107 lines (76 loc) · 2.33 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
<!DOCTYPE html>
<html>
<head>
<style>
textarea:focus
{
text-decoration: none;
}
*
{
box-sizing:border-box; /* easier box-model calculations */
-webkit-box-sizing: border-box;
}
html, body
{
height: 100%;
margin:0;
}
textarea
{
border-style: none;
border-color: Transparent;
outline: none;
background-color: #772953;
color: green;
font-size: 20px;
font-family: "Consolas";
position: fixed;
width: calc(100vw - 20px);
height: calc(100vh - 20px);
overflow-y: scroll;
resize: none;
}
</style>
</head>
<body>
<textarea spellcheck="false"></textarea>
<script src="kodi.js"></script>
<script>
var txt = document.querySelector( "textarea" );
koka += "\n\n";
var permbajtja = koka;
var n = 0;
var i = 0;
window.onload = function()
{
txt.style.width = window.innerWidth + "px";
txt.style.height = window.innerHeight + "px";
txt.value = koka;
txt.focus();
};
document.body.onresize = function()
{
txt.style.width = screen.width;
txt.style.height = screen.height;
};
txt.addEventListener( "keydown", function( event )
{
event.preventDefault();
if( event.keyCode === 8 )
{
if( n > 0 )
n--;
permbajtja = koka + KODI.substring( 0, n - i );
}
else
{
permbajtja += KODI.charAt( n );
n++;
}
txt.value = permbajtja;
} );
txt.addEventListener( "keypress", function( event ){ event.preventDefault(); } );
</script>
</body>
</html>