Created
July 27, 2018 14:20
-
-
Save kenzouno1/33b575f3a07ddc18edc0d84f07d211f7 to your computer and use it in GitHub Desktop.
Pornhub Logo generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="canvas"> | |
<span contenteditable="true" spellcheck="false">Porn</span><span class="orange" contenteditable="true" spellcheck="false">Hub</span> | |
</div> | |
<a href="#" class="cumshot">Cum shot</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.cumshot').click(function(){ | |
html2canvas($('#canvas'), | |
{ | |
onrendered: function (canvas) { | |
var a = document.createElement('a'); | |
// toDataURL defaults to png, so we need to request a jpeg, then convert for file download. | |
a.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream"); | |
a.download = 'somefilename.jpg'; | |
a.click(); | |
} | |
}); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*, *::before, *::after { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
html{ | |
display:flex; | |
align-items:center; | |
height:100vh; | |
text-align:center; | |
justify-content: center; | |
} | |
#canvas { | |
background-color: black; | |
color: white; | |
font: bold 60px Arial; | |
display:inline-block; | |
padding: 40px 30px; | |
} | |
.orange { | |
background-color: orange; | |
color: black; | |
padding: 15px; | |
border-radius: 15px; | |
margin-left: 15px; | |
} | |
.cumshot{ | |
position:fixed; | |
bottom:30px; | |
font-size:40px; | |
text-decoration:none; | |
left:50%; | |
transform:translateX(-50%); | |
color:#000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment