Skip to content

daniel-mf/toasty

Repository files navigation

Toasty!

Make Dan Forden randomly pop up when your users click anywhere.

Usage

Include dist/index.js in your HTML.

<script type="text/javascript" src="dist/index.js" defer></script>

Add toastDocument call for random toasting at user click!

<script type="text/javascript">

    // random toast at user click
    MK.toastDocument();
    
    // or you can pass a chance percentage
    MK.toastDocument(.3); // 30% toast chance. Defaults to 6%
    
</script>

Toast whenever you want to.

//Invoke him.
const dan = new MK.DanForden();

//Let him toast it
dan.toast();

Disclaimer

The Dan Forden image and the Toasty! sound are copyright to their respective owners.
This is an open source API made by MK fans and is not affiliated with said copyright owners in anyway.