diff --git a/HackTimer.js b/HackTimer.js index 95d50cd..797ff95 100644 --- a/HackTimer.js +++ b/HackTimer.js @@ -137,7 +137,6 @@ onmessage = function (event) {\ worker.onerror = function (event) { console.log (event); }; - console.log (logPrefix + 'Initialisation succeeded'); } catch (error) { console.log (logPrefix + 'Initialisation failed'); console.error (error); @@ -145,4 +144,4 @@ onmessage = function (event) {\ } else { console.log (logPrefix + 'Initialisation failed - HTML5 Web Worker is not supported'); } -}) ('HackTimerWorker.js'); \ No newline at end of file +}) ('HackTimerWorker.js'); diff --git a/README.md b/README.md index e969bf0..c8d311b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,32 @@ -# Deprecated -## Use [chrisguttandin/worker-timers](https://github.com/chrisguttandin/worker-timers) instead -Use monkey-patching to replace default `window.setInterval`, `window.clearInterval`, `window.setTimeout`, `window.clearTimeout`. +# HackTimer +Avoid timers throttling by browser when tab is inactive -```js -import * as workerTimers from 'worker-timers'; -window.setInterval = workerTimers.setInterval; -window.clearInterval = workerTimers.clearInterval; -window.setTimeout = workerTimers.setTimeout; -window.clearTimeout = workerTimers.clearTimeout; +# Usage: +Place script reference to **HackTimer.js** (or HackTimer.min.js) before any other JavaScript. +This includes library's such as jQuery as otherwise timed events such as fadeOut and fadeIn will break. + +# NPM +Command: `npm install hacktimer` + +Latest version is 1.1.0 + +Registry URL: https://www.myget.org/F/hack-timer/npm + +# Bower +Command: `bower install hacktimer` + +Latest version is 1.1.0 + +Registry: https://www.myget.org/F/hack-timer/bower/ + +You can specify bower registry in file `.bowerrc` in your working directory +```json +{ + "registry": { + "search": [ + "https://www.myget.org/F/hack-timer/bower/", + "https://bower.herokuapp.com" + ] + } +} ``` diff --git a/package.json b/package.json index ef55eec..48966fc 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,11 @@ { "name": "hacktimer", - "version": "1.1.0", + "version": "1.1.3", "description": "Avoid timers throttling by browser when tab is inactive", "main": "HackTimer.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, "repository": { "type": "git", - "url": "git+https://github.com/turuslan/HackTimer.git" + "url": "git+https://github.com/ctubio/HackTimer.git" }, "keywords": [ "suspend", @@ -25,7 +22,7 @@ "author": "turuslan (http://github.com/turuslan/)", "license": "MIT", "bugs": { - "url": "https://github.com/turuslan/HackTimer/issues" + "url": "https://github.com/ctubio/HackTimer/issues" }, - "homepage": "https://github.com/turuslan/HackTimer" + "homepage": "https://github.com/ctubio/HackTimer" }