-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathedevart.html
More file actions
121 lines (118 loc) · 4.01 KB
/
edevart.html
File metadata and controls
121 lines (118 loc) · 4.01 KB
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
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="pelement.png">
<style>
#background{
background: radial-gradient(ellipse at center, rgba(239,47,47,1) 0%,rgba(155,0,0,1) 100%);
color:#444;
font-weight:bold;
text-align:center;
font-family:Segoe UI,sans-serif;
}
#textField{
position:fixed;
display:block;
width:600px;
height:50px;
top:85%;
left:50%;
margin-top:-25px;
margin-left:-300px;
font-size:30px;
color:#444;
font-weight:bold;
text-align:center;
font-family:Segoe UI,sans-serif;
box-shadow:5px 5px 10px rgba(0,0,0,0.3);
text-transform: uppercase;
}
#frameStyle{
position:fixed;
display:block;
background-image:url(images/edevart/eFrame.png);
background-size:600px 455px;
width:600px;
height:455px;
top:40%;
left:50%;
margin-top:-227px;
margin-left:-300px;
z-index:1000;
line-height: 836px;
font-size: 20px;
font-family: Courier New;
text-shadow: 0 0 5px brown;
}
#content{
position:fixed;
display:block;
background-image:url(images/edevart/thinking.png);
background-color:white;
width:500px;
height:350px;
top:40%;
left:50%;
margin-top:-175px;
margin-left:-250px;
}
</style>
<script>
var sum=0;
var type=0; //0=undefined
var total;
localStorage.yes=42;
localStorage.no=0;
console.log(localStorage.yes);
function vart(e){
if (e.keyCode!=13){
reset();
}else if (e.keyCode == 13){
sum=0;
var string=document.getElementById('textField').value;
for (i=0;i<string.length;i++){
sum+=string.charCodeAt(i);
}
if (sum%2==0){
document.getElementById('content').style="background-image:url(images/edevart/yes.png); background-color:green;";
setText("DE E FAN VÄRT!");
type=1;
}else if (sum%2==1){
document.getElementById('content').style="background-image:url(images/edevart/no.png); background-color:red;";
setText("INTE VÄRT!");
type=2;
}
if (string=="420"){
document.getElementById('content').style="background-image:url(images/edevart/snoop.png); background-color:red;";
setText("SMÖGA GRÄS!");
}else if (string=="lexby"||string=="Lexby"||string=="noob"||string=="n00b"){
document.getElementById('content').style="background-image:url(images/edevart/lexby.png); background-color:red;";
setText("N00B #1");
}else if (string==""){
document.getElementById('content').style="background-image:none; background-color:black;";
setText("static void");
}
}
function reset(){
document.getElementById('content').style="background-image:url(images/edevart/thinking.png); background-color:white;";
document.getElementById('content').title="E DE VÄRT?";
document.getElementById('frameStyle').innerHTML="E DE VÄRT?";
}
function setText(str){
document.getElementById('frameStyle').title=str;
document.getElementById('frameStyle').innerHTML=str;}
//writeOutput();
}
/*function writeOutput(){
if (type==1){total=localStorage.getItem(yes)+1; localStorage.setItem(yes,total);}
else if (type==2){total=localStorage.getItem(no)+1; localStorage.setItem(no,total);}
alert(total);
}*/
</script>
</head>
<body id="background">
<input id="textField" type="text" spellcheck="false" value="E de värt?" onkeypress="vart(event)"></input>
<frameContent id="content"></frameContent>
<fme id="frameStyle" title="E DE VÄRT?">E DE VÄRT?</fme>
</body>
</html>