LeeSpork Author

I made a modification to your script that adds keybindings to the script. I thought you might be interested. If you insert this code into the end of your script, you can use the [E] and [R] keys to show/hide the image, respectively.

function KeyCheck(e)
{
    //console.log(e.keyCode);
    if(e.keyCode==69)
        img.style.opacity = 0;
        slider.setAttribute("value", "0");
    if(e.keyCode==82)
        img.style.opacity = 1;
        slider.setAttribute("value", "1.0");
}

window.addEventListener('keydown', KeyCheck, true);