I have a web page and I want to take a screenshot when I don't use the page after X seconds, that is, when a certain time is reached after the last action Is it possible?
Asked
Active
Viewed 212 times
1 Answers
0
There are plenty answers, a simple google search will help you faster than asking a question.
Additionally,
let timeout
let seconds = 2
function screenshot(){
clearTimeout(timeout)
timeout = setTimeout(function(){takescreenshot()},seconds*1000)
}
document.body.addEventListener("mousemove",function(){screenshot()});
document.body.addEventListener("click",function(){screenshot()})

Servus
- 479
- 3
- 13