tampermonkey.php
Quell Code
<!doctype html>
<html lang="de">
<head>
<style>
#ausgabe{
height:30px;
width:100vw;
display:flex;
color:white;
}
.zahl{
flex:1;
font-size:25px;
border:1px solid black;
text-align:center;
}
#treffer{
font-size:60px;
color:green;
font-weight:900;
display:block;
}
body{
height:100vh;
background:
linear-gradient(
rgba(35,43,85,0.75),
rgba(35,43,85,0.95)),
url(https://dl.dropboxusercontent.com/u/22006283/preview/codepen/clouds-cloudy-forest-mountain.jpg) no-repeat center center;
background-size: cover;
margin-left: auto;
margin-right: auto;
border-top: solid 1px rgba(255,255,255,.5);
border-radius: 5px;
box-shadow: 0px 2px 7px rgba(0,0,0,0.2);
overflow: hidden;
transition: all .5s ease;
}
input{
width: 200px;
height: 35px;
padding-left: 15px;
border: none;
color:white;
border-radius: 20px;
margin-bottom: 20px;
background: rgba(55,55,55,.5);
outline:0px solid red;
cursor:pointer;
}
h3{
text-align:center;
color:white;
}
input:hover{
background:rgba(255,0,200,0.5);
}
</style>
</head>
<body>
<h3>Überwachung</h3>
<input style="width:100px" title="Gebe eine Zahl zwischen 00.00 und 99.99 ein" type="text" id="ueber1">
<input style="width:100px" title="Gebe eine Zahl zwischen 00.00 und 99.99 ein" type="text" id="ueber2">
<input style="width:100px" title="Gebe eine Zahl zwischen 00.00 und 99.99 ein" type="text" id="ueber3">
<input style="width:100px" title="Gebe eine Zahl zwischen 00.00 und 99.99 ein" type="text" id="ueber4">
<input style="width:100px" title="Gebe eine Zahl zwischen 00.00 und 99.99 ein" type="text" id="ueber5"><br>
<input type="button" id="uebersave" value="Zahlen speichern"><input type="button" id="ueberstart" value="Bot Start"><br>
<div id="ausgabe"></div>
<span id="ueberinfo"></span>
<script>
var sounddatei='http://sebastian1012.bplaced.net/chat/Boomchat/sounds/alarm_3.mp3';
info=document.getElementById('ueberinfo');
for(a=1;a<=5;a++){
if(localStorage.getItem('uberzahl'+a)){
document.getElementById('ueber'+a).value=localStorage.getItem('uberzahl'+a);
}else{
localStorage.setItem('uberzahl'+a,0);
document.getElementById('ueber'+a).value=0;
}
}
speichern=document.getElementById('uebersave');
speichern.addEventListener('click',function(e){
for(a=1;a<=5;a++){
valu=document.getElementById('ueber'+a).value;
if(valu<=99.99){
localStorage.setItem('uberzahl'+a,valu);
info.innerHTML+='Feld '+a+' gespeichert<br>';
}else{
info.innerHTML+='Zahl '+a+' ist keine Zahl oder größer als 99.99<br>';
}
}
setTimeout(function(){
info.innerHTML='';
},2000)
})
starten=document.getElementById('ueberstart');
starten.addEventListener('click',function(e){
info.innerHTML+='Bot gestartet';
p=1;
timer=setInterval(function(){
var lesen=[];
document.getElementById('ausgabe').innerHTML='';
for(a=1;a<=5;a++){
hk=Math.floor(Math.random() * (99 - 11 + 1)) + 11;
hk=hk+'.'+hk;
lesen.push(hk);
document.getElementById('ausgabe').innerHTML+='<span class="zahl">'+hk+'</span>';
}
console.log(lesen)
for(a=1;a<=5;a++){
for(a1=0;a1<=4;a1++){
meine=localStorage.getItem('uberzahl'+a);
//info.innerHTML+=lesen[a1]+'-'+meine;
if(lesen[a1]==meine){
info.innerHTML+='<span id="treffer">treffer Feld '+a+' = '+meine+'</span><br>'
+''
+'<embed src="'+sounddatei+'" autostart="true" hidden="true" height="0" width="0">';
clearInterval(timer);
return;
break;
}else{
info.innerHTML='Bot gestartet - Durchlauf '+p;
}
}
}
p++;
},2000)
})
</script>
</body>
</html>