adryd325 / oneko.js

Cat follow mouse real! A hacky script I wrote to put a cat on my site.
MIT License
695 stars 68 forks source link

Add custom cat support #21

Closed Commenter25 closed 10 months ago

Commenter25 commented 10 months ago

Closes #6

Allows specifying a custom image to use by adding the attribute data-cat="yourimage.png" to the script tag. This implementation should have the same backwards compatibility as oneko.js currently does, but I tried to ensure it would safely fallback in the very niche case it breaks. If this isn't a concern, I can simplify it to two lines.

Also documents this feature in the README