A
A
Anton2014-08-28 18:27:34
JavaScript
Anton, 2014-08-28 18:27:34

How to determine in a minimized browser tab that the user is inactive?

I'm writing a small javascript script to track the time of work on projects. And the following question arose: is it possible to somehow determine that the user is inactive - he does not move the mouse, did not press the keys, the screen saver turned on, etc.?
I understand how to do this in the active browser window. But is it possible to somehow determine this when the window is minimized?
Perhaps browser extensions have access to some kind of API? Or some module for Node.js? In general, any options, if they exist, will do.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Anton, 2014-08-28
@h8every1

In general, this cannot be done using javascript for security reasons.

S
Sergey, 2014-08-28
Protko @Fesor

No. You can only determine that the user has closed / minimized the tab.

V
Vitaly Zheltyakov, 2014-08-28
@VitaZheltyakov

This is done with the focus/blur event hung on the document

X
xmoonlight, 2014-08-28
@xmoonlight

Do it on node-webkit
Everything will be there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question