Go to file
2016-01-20 21:03:52 +03:00
bower.json NPM, Bower - prepare for 1.1.0 release. 2016-01-20 21:03:52 +03:00
HackTimer.js (issue 12) Not reusing last fake id to prevent collisions. 2016-01-18 09:15:54 +03:00
HackTimer.min.js Some more minifications, proposed by yann@le-brech.fr 2016-01-18 22:27:11 +03:00
HackTimer.silent.min.js Some more minifications, proposed by yann@le-brech.fr 2016-01-18 22:27:11 +03:00
HackTimerWorker.js Checking fake id in list before removing (clearTimeout, clearInterval) in worker. Removing fake id from list after setTimeout callback was called in worker. Minified version. 2015-07-10 21:08:01 +05:00
HackTimerWorker.min.js Checking fake id in list before removing (clearTimeout, clearInterval) in worker. Removing fake id from list after setTimeout callback was called in worker. Minified version. 2015-07-10 21:08:01 +05:00
LICENSE Added MIT license 2015-09-01 11:08:14 +03:00
package.json NPM, Bower - prepare for 1.1.0 release. 2016-01-20 21:03:52 +03:00
README.md Added NPM section to readme.md 2015-09-27 14:37:48 +03:00

HackTimer

Avoid timers throttling by browser when tab is inactive

Usage:

Place script reference to HackTimer.js (or HackTimer.min.js) before any other JavaScript

NPM

Command: npm install hacktimer --reg https://www.myget.org/F/hack-timer/npm

Registry URL: https://www.myget.org/F/hack-timer/npm

Bower

Command: bower install hacktimer

Registry: https://www.myget.org

You can specify bower registry in file .bowerrc in your working directory

{
  "registry": {
      "search": [
          "https://www.myget.org",
          "https://bower.herokuapp.com"
      ]
  }
}

Notes

Loader code HackTimer.js (or HackTimer.min.js) may be placed in separate file or in script tag.

Worker code HackTimerWorker.js (or HackTimerWorker.min.js) must be placed in separate file. It is used to fallback if Blob is not supported

To change worker code script name or path go to the end of HackTimer.js (or HackTimer.min.js) file and replace script name.

HackTimer.silent.min.js writes to log only if initialisation failed. Use it with HackTimerWorker.min.js .

Warning

Full code (HackTimer.js and HackTimerWorker.js) must not be used with minified (HackTimer.min.js and HackTimerWorker.min.js), i.e. HackTimer.js must use only HackTimerWorker.js and HackTimer.min.js must use only HackTimerWorker.min.js .