Created
January 18, 2023 20:31
-
-
Save macro6461/6a54621a199a4713a6c782ac98f10839 to your computer and use it in GitHub Desktop.
JavaScript pertaining to popup blog post
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
const constructPopup = () => { | |
// propbably not the most efficient solution to hiding the popup | |
// but the code is here if for whatever reason you might want to use it | |
document.body.innerHTML += popupString; | |
} | |
const popupString = ` | |
<div class="popup outer"> | |
<div class="popup inner"> | |
<button class="close">x</button> | |
<img src="giphy.gif"/> | |
<h3>Here is your popop!</h3> | |
<p>If you liked this tool, please leave a tip or follow me on Medium!</p> | |
<p>Thanks for using the custom popup!</p> | |
<a href="https://paypal.me/mattcroak?country.x=US&locale.x=en_US" target="_blank">Paypal</a> | |
<a href="https://matt-croak.medium.com/membership" target="_blank">Medium</a> | |
</div> | |
<!-- uncomment below to use with full screen popup --> | |
<!-- <div class="background-mask"></div> --> | |
</div> | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment