<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { background-color: black; } html, body { margin:0; padding:0; } /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ padding-top: 0px; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.9); /* Black w/ opacity */ } /* Modal Content (Image) */ .modal-content { margin: auto; display: block; width: 80%; max-width: 700px; } /* Add Animation - Zoom in the Modal */ .modal-content, #caption { animation-name: zoom; animation-duration: 0.6s; } @keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} } /* The Close Button */ .close { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; } .close:hover, .close:focus { color: #bbb; text-decoration: none; cursor: pointer; } /* 100% Image Width on Smaller Screens */ @media only screen and (max-width: 700px){ .modal-content { width: 100%; } } #mainCanvas { -webkit-user-select: none; /* Safari */ -ms-user-select: none; /* IE 10 and IE 11 */ user-select: none; /* Standard syntax */ } </style> </head> <body> <center> <canvas id="mainCanvas" style="object-fit: contain;"></canvas> <canvas id="smallCanvas" ></canvas> </center> <!-- The Modal --> <div id="myModal" class="modal"> <!-- The Close Button --> <span class="close">&times;</span> <!-- Modal Content (The Image) --> <img class="modal-content" id="img01" style="object-fit: contain; width: 100vw; height: 100vh;" width="4096" height="4096"> </div> <script type="text/javascript"> function a(){return"#"+(Math.random()*16777215<<0).toString(16).padStart(6,"0")}function n(a,n){return Math.floor(Math.random()*(n-a+1)+a)}var t=n(-10,10);var v=n(-10,10);function r(a,n){return Math.random()*(n-a)+a}mainCanvas=document.getElementById("mainCanvas");mainCanvas.width=4096;mainCanvas.height=4096;mainCanvas.style.width="100vw";mainCanvas.style.height="100vh";mainCanvas.getContext("2d").scale(2,2);var h=mainCanvas.getContext("2d");smallCanvas=document.getElementById("smallCanvas");smallCanvas.hidden=true;smallCanvas.width=1024;smallCanvas.height=1024;smallCanvas.getContext("2d");var l=smallCanvas.getContext("2d");var s="#000000";var m="#dba901";var M="#f6d001";var i="#000000";var e="#f7e901";var c="#000000";var o="#f7f700";var f="#000000";var C=l.createLinearGradient(0,Math.floor(Math.random()*1024),Math.floor(Math.random()*1024),Math.floor(Math.random()*1024));C.addColorStop(Math.random(),"#000000");C.addColorStop(Math.random(),"#ffffff");C.addColorStop(Math.random(),"#000000");C.addColorStop(Math.random(),"#ffffff");l.fillStyle=C;l.fillRect(0,0,1024,1024);h.translate(1024,1024);var u=l.createLinearGradient(0,Math.floor(Math.random()*1024),Math.floor(Math.random()*1024),Math.floor(Math.random()*1024));u.addColorStop(Math.random(),m);u.addColorStop(Math.random(),M);u.addColorStop(Math.random(),i);u.addColorStop(Math.random(),e);u.addColorStop(Math.random(),c);u.addColorStop(Math.random(),o);u.addColorStop(Math.random(),f);var d=document.getElementById("smallCanvas");var g=d.getContext("2d");var k=Math.floor(Math.random()*50.090909095);var w=r(7e4,9e4);var b=r(0,512);var y=r(0,512);var T=Math.floor(Math.random()*1)+.0079;var p=423.9519765669732;var q=p;g.moveTo(b,y);while(q<k+w){var I=b+q*Math.cos(q)*T;var j=y+q*Math.sin(q)*T;g.lineTo(I,j);q=q+p}g.fillStyle=u;g.fillRect(0,0,4096,4096);g.shadowColor=i;g.shadowOffsetX=t;g.shadowOffsetY=v;g.shadowBlur=500;g.strokeStyle=i;g.lineWidth=8;g.stroke();l.moveTo(b,y);var q=p;while(q<k+w){var I=b+q*Math.cos(q)*T;var j=y+q*Math.sin(q)*T;l.lineTo(I,j);q=q+p}l.strokeStyle=C;l.lineWidth=3;l.stroke();h.drawImage(smallCanvas,0,0);h.scale(1,-1);h.drawImage(smallCanvas,0,0);h.scale(-1,1);h.drawImage(smallCanvas,0,0);h.scale(1,-1);h.drawImage(smallCanvas,0,0);let x;document.getElementById("mainCanvas").addEventListener("click",a=>{if(a.detail===1){x=setTimeout(()=>{console.log("click");location.reload()},200)}});document.getElementById("mainCanvas").addEventListener("dblclick",a=>{clearTimeout(x);console.log("dblclick");z()});function z(){var a=mainCanvas.toDataURL({format:"image/png",t:1,width:4096,height:4096});var n=new Image;n.src=a;var t=document.getElementById("myModal");var v=document.getElementById("img01");t.style.display="block";v.src=a;var r=document.getElementsByClassName("close")[0];r.onclick=function(){t.style.display="none"}} </script> </body> </html>
Inscription number 247,799
Genesis block 778,915
File type text
File size 4.89 KB
Creation date Jul 28,2024 3:31 pm