diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-31 19:52:12 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-31 19:52:12 +0100 |
commit | 44d580b3eba036cfcc85b257f9cb201731c502b1 (patch) | |
tree | 6be642d592cd52a395bb6d80398ec9a998d8057c | |
download | lovetester-44d580b3eba036cfcc85b257f9cb201731c502b1.tar.xz |
Initial commit
-rw-r--r-- | LICENSE | 16 | ||||
-rw-r--r-- | README.md | 7 | ||||
-rwxr-xr-x | heart.svg | 211 | ||||
-rwxr-xr-x | image.png | bin | 0 -> 64036 bytes | |||
-rwxr-xr-x | index.html | 57 |
5 files changed, 291 insertions, 0 deletions
@@ -0,0 +1,16 @@ + + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e8eece --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# LoveTester +Test wether you end up with your crush or not. + + + +## Context +I made this a few years ago and it was one of the first pieces of code I wrote, so please be gentle when reading the code. diff --git a/heart.svg b/heart.svg new file mode 100755 index 0000000..9278516 --- /dev/null +++ b/heart.svg @@ -0,0 +1,211 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:ns1="http://sozi.baierouge.fr" + id="svg5353" + sodipodi:docname="pink heart.svg" + viewBox="0 0 180 160.28" + sodipodi:version="0.32" + version="1.0" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:version="0.46" + > + <defs + id="defs5355" + > + <filter + id="filter5301" + inkscape:collect="always" + > + <feGaussianBlur + id="feGaussianBlur5303" + stdDeviation="35.518097" + inkscape:collect="always" + /> + </filter + > + <filter + id="filter5089" + inkscape:collect="always" + > + <feGaussianBlur + id="feGaussianBlur5091" + stdDeviation="2.0296004" + inkscape:collect="always" + /> + </filter + > + </defs + > + <sodipodi:namedview + id="base" + bordercolor="#666666" + inkscape:pageshadow="2" + inkscape:window-y="25" + pagecolor="#ffffff" + inkscape:window-height="825" + inkscape:zoom="1.7948842" + inkscape:window-x="0" + showgrid="false" + borderopacity="1.0" + inkscape:current-layer="layer1" + inkscape:cx="121.21831" + inkscape:cy="160.74009" + inkscape:window-width="1440" + inkscape:pageopacity="0.0" + inkscape:document-units="px" + /> + <g + id="layer1" + inkscape:label="Capa 1" + inkscape:groupmode="layer" + transform="translate(-5.0007 -108.29)" + > + <path + id="path5187" + sodipodi:nodetypes="cccsccc" + style="stroke-linejoin:round;fill-rule:evenodd;stroke:#000000;stroke-width:1.6299;fill:#ff0066" + d="m55.967 109.11c-50.087-0.9-96.436 77.43 38.6 158.64 0.147-0.27 0.718-0.27 0.865 0 139.39-83.83 85.518-164.58 33.758-158.29-20.18 2.45-29.704 13.64-34.19 23.28-4.486-9.64-14.009-20.83-34.186-23.28-1.618-0.2-3.231-0.32-4.847-0.35z" + /> + <path + id="path5195" + style="filter:url(#filter5089);fill-rule:evenodd;fill:#ff2a7f" + transform="matrix(.88948 0 0 -.88948 15761 3803.4)" + d="m-17688 4045.3c-14 19-24 44.2-17 67.8 7 20.5 27 35.5 49 34.2 7-0.2 15-2 20-5.2-31-1-59-28.2-59-59.4 0-13.5 3-26.9 9-39-1 0.5-1 1-2 1.6z" + /> + <path + id="path5197" + style="filter:url(#filter5089);fill-rule:evenodd;fill:#ff5599" + transform="matrix(.88948 0 0 -.88948 15761 3803.4)" + d="m-17698 4072.8c-8 18.5-7 42.2 8 57 9 9.7 24 15.1 37 13.4-29-9.1-50-40-45-70.6v0.2z" + /> + <path + id="path5201" + style="filter:url(#filter5089);fill-rule:evenodd;fill:#ffffff" + transform="matrix(.88948 0 0 -.88948 15761 3803.4)" + d="m-17699 4104.4c2 13 11 25.2 23 30.6-10-8.2-18-19-23-31.2v0.6z" + /> + <path + id="path5278" + sodipodi:nodetypes="ccc" + style="filter:url(#filter5301);fill-rule:evenodd;fill:#ff5599" + transform="matrix(.062423 0 0 .062423 407.61 -252.74)" + d="m-3824.4 6087c95.5 871.7-341.5 1448.6-1185.7 2186.3 1030-572.9 1706.6-1491.6 1185.7-2186.3z" + /> + <path + id="path5307" + style="filter:url(#filter5301);fill-rule:evenodd;fill:#ffaaaa" + sodipodi:type="inkscape:offset" + d="m-3748.8 6358.9c-7.3 330.4-97.5 624.4-261.4 903.6-101.7 173.1-231.3 340.8-386.2 510.1 213.1-183.5 387.2-380.5 506.5-579.3 172.2-287.2 232.7-570.7 141.1-834.4z" + inkscape:original="M -3824.375 6086.9375 C -3728.8642 6958.7053 -4165.929 7535.6167 -5010.0625 8273.25 C -3980.0516 7700.4255 -3303.5089 6781.7201 -3824.375 6086.9375 z " + transform="matrix(.062423 0 0 .062423 407.61 -252.74)" + inkscape:radius="-63.30946" + /> + <path + id="path5309" + style="filter:url(#filter5301);fill-rule:evenodd;fill:#ffffff" + sodipodi:type="inkscape:offset" + d="m-3735.3 6510.8c-28 274-114.9 524.5-255.2 763.3-33.7 57.4-70.4 114.1-110 170.5 73.8-86.8 137.9-174.9 190.9-263.1 138.4-230.9 203.4-456.3 174.3-670.7z" + inkscape:original="M -3824.375 6086.9375 C -3728.8642 6958.7053 -4165.929 7535.6167 -5010.0625 8273.25 C -3980.0516 7700.4255 -3303.5089 6781.7201 -3824.375 6086.9375 z " + transform="matrix(.062423 0 0 .062423 407.61 -252.74)" + inkscape:radius="-86.271767" + /> + </g + > + <metadata + > + <rdf:RDF + > + <cc:Work + > + <dc:format + >image/svg+xml</dc:format + > + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" + /> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" + /> + <dc:publisher + > + <cc:Agent + rdf:about="http://openclipart.org/" + > + <dc:title + >Openclipart</dc:title + > + </cc:Agent + > + </dc:publisher + > + <dc:title + >pink heart</dc:title + > + <dc:date + >2009-09-24T23:49:07</dc:date + > + <dc:description + >Pink heart.</dc:description + > + <dc:source + >https://openclipart.org/detail/27536/pink-heart-by-secretlondon</dc:source + > + <dc:creator + > + <cc:Agent + > + <dc:title + >secretlondon</dc:title + > + </cc:Agent + > + </dc:creator + > + <dc:subject + > + <rdf:Bag + > + <rdf:li + >heart</rdf:li + > + <rdf:li + >pink</rdf:li + > + <rdf:li + >remix</rdf:li + > + </rdf:Bag + > + </dc:subject + > + </cc:Work + > + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/" + > + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" + /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" + /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" + /> + </cc:License + > + </rdf:RDF + > + </metadata + > +</svg +> diff --git a/image.png b/image.png Binary files differnew file mode 100755 index 0000000..4fb820b --- /dev/null +++ b/image.png diff --git a/index.html b/index.html new file mode 100755 index 0000000..376cb13 --- /dev/null +++ b/index.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> + <head> + <title>Love Tester</title> + <meta charset="utf-8"> + <style> + body{width:100%;height:100%;background-color:#FFA5E9} + .name{color:blue;font-weight:bold;font-size:30px;} + #font{color:#BD003F;position:relative;bottom:300px;} + </style> + <script> + let exceptions = {}; + + exceptions["LARA" + "MARVIN"] = 2; + exceptions["DENNIS" + "EISHALLE"] = 2; + exceptions["MALTE" + "FIONA"] = 99; + exceptions["BATU" + "ALIAH"] = 9; + + !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); + function test(){ + var name1 = document.getElementsByName('name1')[0].value.toUpperCase(); + var name2 = document.getElementsByName('name2')[0].value.toUpperCase(); + var result = magic(name1,name2); + happy(result*10); + } + function down(){ + document.getElementById('heart').width = 450; + document.getElementById('heart').style.top = "25px"; + document.getElementById('font').style.bottom = "250px"; + } + function up(){ + document.getElementById('heart').width = 500; + document.getElementById('heart').style.top = "0px"; + document.getElementById('font').style.bottom = "300px"; + } + + function magic(name1,name2){ + let cat = name1 + name2; + return exceptions[cat] || Math.floor(new Math.seedrandom(cat)()*100); + } + function happy(value){ + var nw = 0; + window.setInterval(_=>{if(nw < value){nw++;document.getElementById('bar').style.width = nw + "px";document.getElementById('bar').innerHTML = Math.floor(nw/10) + "%" }},5); + } + </script> + </head> + <body><center> + <br><br> + <input class="name" type="name" name="name1" placeholder="Enter Your Name"> + <br><br> + <input class="name" type="name" name="name2" placeholder="Enter his/her Name"> + <br><br> + <img id="heart" src="heart.svg" width="500" onclick="test()" onmousedown="down()" onmouseup="up()" style="position:relative"> + <h1 id="font" onclick="test()" onmousedown="down()" onmouseup="up()">Test Love</h1> + <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> + </body></center> +</html> |