Skip to content

Commit 7e7b1fe

Browse files
committed
Merge branch 'master' of https://github.com/ctubio/HackTimer_fork into ctubio-master
# Conflicts: # README.md
2 parents dbb2113 + 1116625 commit 7e7b1fe

File tree

3 files changed

+36
-19
lines changed

3 files changed

+36
-19
lines changed

HackTimer.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,11 @@ onmessage = function (event) {\
137137
worker.onerror = function (event) {
138138
console.log (event);
139139
};
140-
console.log (logPrefix + 'Initialisation succeeded');
141140
} catch (error) {
142141
console.log (logPrefix + 'Initialisation failed');
143142
console.error (error);
144143
}
145144
} else {
146145
console.log (logPrefix + 'Initialisation failed - HTML5 Web Worker is not supported');
147146
}
148-
}) ('HackTimerWorker.js');
147+
}) ('HackTimerWorker.js');

README.md

+31-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1-
# Deprecated
2-
## Use [chrisguttandin/worker-timers](https://github.com/chrisguttandin/worker-timers) instead
3-
Use monkey-patching to replace default `window.setInterval`, `window.clearInterval`, `window.setTimeout`, `window.clearTimeout`.
4-
5-
```js
6-
import * as workerTimers from 'worker-timers';
7-
window.setInterval = workerTimers.setInterval;
8-
window.clearInterval = workerTimers.clearInterval;
9-
window.setTimeout = workerTimers.setTimeout;
10-
window.clearTimeout = workerTimers.clearTimeout;
1+
# HackTimer
2+
Avoid timers throttling by browser when tab is inactive
3+
4+
# Usage:
5+
Place script reference to **HackTimer.js** (or HackTimer.min.js) before any other JavaScript.
6+
This includes library's such as jQuery as otherwise timed events such as fadeOut and fadeIn will break.
7+
8+
# NPM
9+
Command: `npm install hacktimer`
10+
11+
Latest version is 1.1.0
12+
13+
Registry URL: https://www.myget.org/F/hack-timer/npm
14+
15+
# Bower
16+
Command: `bower install hacktimer`
17+
18+
Latest version is 1.1.0
19+
20+
Registry: https://www.myget.org/F/hack-timer/bower/
21+
22+
You can specify bower registry in file `.bowerrc` in your working directory
23+
```json
24+
{
25+
"registry": {
26+
"search": [
27+
"https://www.myget.org/F/hack-timer/bower/",
28+
"https://bower.herokuapp.com"
29+
]
30+
}
31+
}
1132
```

package.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
22
"name": "hacktimer",
3-
"version": "1.1.0",
3+
"version": "1.1.3",
44
"description": "Avoid timers throttling by browser when tab is inactive",
55
"main": "HackTimer.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
96
"repository": {
107
"type": "git",
11-
"url": "git+https://github.com/turuslan/HackTimer.git"
8+
"url": "git+https://github.com/ctubio/HackTimer.git"
129
},
1310
"keywords": [
1411
"suspend",
@@ -25,7 +22,7 @@
2522
"author": "turuslan <[email protected]> (http://github.com/turuslan/)",
2623
"license": "MIT",
2724
"bugs": {
28-
"url": "https://github.com/turuslan/HackTimer/issues"
25+
"url": "https://github.com/ctubio/HackTimer/issues"
2926
},
30-
"homepage": "https://github.com/turuslan/HackTimer"
27+
"homepage": "https://github.com/ctubio/HackTimer"
3128
}

0 commit comments

Comments
 (0)