]> git.lizzy.rs Git - lovetester.git/blob - index.html
Merge pull request #1 from Minetest-j45/patch-1
[lovetester.git] / index.html
1 <!DOCTYPE html>
2 <html>
3         <head>
4                 <title>Love Tester</title>
5                 <meta charset="utf-8">
6                 <style>
7                         body{width:100%;height:100%;background-color:#FFA5E9}
8                         .name{color:blue;font-weight:bold;font-size:30px;}
9                         #font{color:#BD003F;position:relative;bottom:300px;}
10                 </style>
11                 <script>
12                 let exceptions = {};
13
14                 exceptions["LARA" + "MARVIN"] = 2;
15                 exceptions["DENNIS" + "EISHALLE"] = 2;
16                 exceptions["MALTE" + "FIONA"] = 99;
17                 exceptions["BATU" + "ALIAH"] = 9;
18                                         
19                 !function(f,a,c){var s,l=256,p="random",d=c.pow(l,6),g=c.pow(2,52),y=2*g,h=l-1;function n(n,t,r){function e(){for(var n=u.g(6),t=d,r=0;n<g;)n=(n+r)*l,t*=l,r=u.g(1);for(;y<=n;)n/=2,t/=2,r>>>=1;return(n+r)/t}var o=[],i=j(function n(t,r){var e,o=[],i=typeof t;if(r&&"object"==i)for(e in t)try{o.push(n(t[e],r-1))}catch(n){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[n,S(a)]:null==n?function(){try{var n;return s&&(n=s.randomBytes)?n=n(l):(n=new Uint8Array(l),(f.crypto||f.msCrypto).getRandomValues(n)),S(n)}catch(n){var t=f.navigator,r=t&&t.plugins;return[+new Date,f,r,f.screen,S(a)]}}():n,3),o),u=new m(o);return e.int32=function(){return 0|u.g(4)},e.quick=function(){return u.g(4)/4294967296},e.double=e,j(S(u.S),a),(t.pass||r||function(n,t,r,e){return e&&(e.S&&v(e,u),n.state=function(){return v(u,{})}),r?(c[p]=n,t):n})(e,i,"global"in t?t.global:this==c,t.state)}function m(n){var t,r=n.length,u=this,e=0,o=u.i=u.j=0,i=u.S=[];for(r||(n=[r++]);e<l;)i[e]=e++;for(e=0;e<l;e++)i[e]=i[o=h&o+n[e%r]+(t=i[e])],i[o]=t;(u.g=function(n){for(var t,r=0,e=u.i,o=u.j,i=u.S;n--;)t=i[e=h&e+1],r=r*l+i[h&(i[e]=i[o=h&o+t])+(i[o]=t)];return u.i=e,u.j=o,r})(l)}function v(n,t){return t.i=n.i,t.j=n.j,t.S=n.S.slice(),t}function j(n,t){for(var r,e=n+"",o=0;o<e.length;)t[h&o]=h&(r^=19*t[h&o])+e.charCodeAt(o++);return S(t)}function S(n){return String.fromCharCode.apply(0,n)}if(j(c.random(),a),"object"==typeof module&&module.exports){module.exports=n;try{s=require("crypto")}catch(n){}}else"function"==typeof define&&define.amd?define(function(){return n}):c["seed"+p]=n}("undefined"!=typeof self?self:this,[],Math);
20                 function test(){
21                         var name1 = document.getElementsByName('name1')[0].value.toUpperCase();
22                         var name2 = document.getElementsByName('name2')[0].value.toUpperCase();
23                                 var result = magic(name1,name2);
24                                 happy(result*10);
25                         }
26                 function down(){
27                         document.getElementById('heart').width = 450;
28                         document.getElementById('heart').style.top = "25px";
29                         document.getElementById('font').style.bottom = "250px";
30                         }
31                 function up(){
32                         document.getElementById('heart').width = 500;
33                         document.getElementById('heart').style.top = "0px";
34                         document.getElementById('font').style.bottom = "300px";
35                         }
36                         
37                 function magic(name1,name2){
38                         let cat = name1 + name2;
39                         return exceptions[cat] || Math.floor(new Math.seedrandom(cat)()*100);
40                 }
41                 function happy(value){
42                         var nw = 0;
43                         window.setInterval(_=>{if(nw < value){nw++;document.getElementById('bar').style.width = nw + "px";document.getElementById('bar').innerHTML = Math.floor(nw/10) + "%" }},5);
44                         }               
45                 </script>
46         </head>
47         <body><center>
48                 <br><br>
49                 <input class="name" type="name" name="name1" placeholder="Enter Your Name">
50                 <br><br>
51                 <input class="name"  type="name" name="name2" placeholder="Enter their Name">
52                 <br><br>
53                 <img id="heart" src="heart.svg" width="500" onclick="test()" onmousedown="down()" onmouseup="up()" style="position:relative">
54                 <h1 id="font" onclick="test()" onmousedown="down()" onmouseup="up()">Test Love</h1>
55                 <div style="position:fixed;bottom:5px;left:0px;width:100%"><center><div align="right" style="color:white;font-size:40px;width:1000px;height:50px;background-color:white;border-style:solid;border-color:#004EFF;border-radius:1%;position:relative"><div id="bar"style="position:absolute;left:0px;top:0px;width:0px;height:50px;background-color:#CA00A5;border-radius:1%"></div></div></center></div>
56         </body></center>
57 </html>