Skip to content

Commit c0a9354

Browse files
author
Shane Stebner
authored
Merge pull request #17 from ggirard/master
Change decrement logic
2 parents d9a5ee5 + 8508f5e commit c0a9354

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/jTimeout.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jTimeout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
/* If the last tab to interact is the same as this one */
237237
if (whichTab === timeout.options.tabID)
238238
{
239-
seconds = seconds - timeout.options.heartbeat;
239+
seconds = seconds - Math.abs(((new Date()).getTime() - new Date(whichTabLast).getTime()) / 1000);
240240
timeout.setTabLast();
241241
timeout.setTimer(seconds);
242242
}

0 commit comments

Comments
 (0)