Skip to content


Repository files navigation


Tiny script to show a donation popup to common visitors to a website


    window.DOP_config = {
        links: { // Replace with your links
            paypal: "",
            patreon: "",
            donorbox: "",
            kofi: ""
<script src=""></script>
npm install --save donationpopup


    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