Skip to content

Commit

Permalink
Merge pull request #17 from ggirard/master
Browse files Browse the repository at this point in the history
Change decrement logic
  • Loading branch information
Shane Stebner authored Aug 12, 2018
2 parents d9a5ee5 + 8508f5e commit c0a9354
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/jTimeout.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/jTimeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
/* If the last tab to interact is the same as this one */
if (whichTab === timeout.options.tabID)
{
seconds = seconds - timeout.options.heartbeat;
seconds = seconds - Math.abs(((new Date()).getTime() - new Date(whichTabLast).getTime()) / 1000);
timeout.setTabLast();
timeout.setTimer(seconds);
}
Expand Down

0 comments on commit c0a9354

Please sign in to comment.