donationpopup
v1.2.1
Published
Tiny script to show a donation popup to common visitors to a website
Downloads
18
Readme
DonationPopup
Tiny script to show a donation popup to common visitors to a website
Installation
<script>
window.DOP_config = {
links: { // Replace with your links
paypal: "https://paypal.me/inventivetalent",
patreon: "https://patreon.com/inventivetalent",
donorbox: "https://donorbox.org/inventivetalent-general-donation",
kofi: "https://ko-fi.com/inventivetalent"
}
}
</script>
<script src="https://unpkg.com/[email protected]/DonationPopup.min.js"></script>
npm install --save donationpopup
Configuration
{
visits: 10,// Number of visits required for the popup to first show up
timeout: 24,// Timeout for the 'remind later' option in hours
text: "Hey there, sorry for the interruption!\nIt looks like you've visited this site a couple of times - if you like it and want to help keep it running, please consider throwing over a small donation :)",// Text of the popup
postponeText: "Maybe Later",// Text on the 'remind me later' button
dismissText: "Never!",// Text on the dismiss button
color: "#9c9c9c",// Background color
position: "bottom-right",// Position of the popup
enableAnalytics: false,// Toggle Google Analytics - will send a custom event on clicks if enabled
links: {
paypal: "",// PayPal link
patreon: "",// Patreon link
donorbox: "",// Donorbox link
kofi: "",// Ko-fi link
custom: null // can be a function to add custom HTML
}
}
Check the source for more advanced configuration options