I want to add a screensaver container to my website when mouse is idle for X seconds. I found this piece of code to make that happen. As you can see, you set custom amount of time to wait (3000ms in the example) before displaying the screensaver. What I want to achieve is let users to add the amount of time they prefer through an input and the function take effect without reloading the page. I have poor knowledge of javascript and although I searched a lot, I am sure I do not know the right search terms to help me find a solution so I am asking here for help. Is this possible? If yes, what should I do?
Thanks in advance.