diff options
Diffstat (limited to 'src/SMAPI.Web/wwwroot/Content/js/index.js')
-rw-r--r-- | src/SMAPI.Web/wwwroot/Content/js/index.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js new file mode 100644 index 00000000..54fdf6d9 --- /dev/null +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -0,0 +1,16 @@ +document.addEventListener('DOMContentLoaded', setupHover, false); + +function setupHover() { + var pufferchick = document.getElementById("pufferchick"); + var downloadLinks = document.getElementsByClassName("download"); + + for (var downloadLink of downloadLinks) { + downloadLink.addEventListener("mouseenter", function () { + pufferchick.src = "Content/images/pufferchick-cool.png"; + }); + + downloadLink.addEventListener("mouseleave", function () { + pufferchick.src = "favicon.ico"; + }); + } +} |