Greasy Fork is available in English.
Speed up or slow down any webpage by hooking JS timing functions
Time Hooker is a powerful Tampermonkey userscript that hooks into JavaScript's core timing APIs to let you speed up, slow down, or freeze time on any webpage. Control animations, countdowns, timers, and everything time-dependent — all with a sleek floating UI.
Install Now · Features · How It Works · Keyboard Shortcuts · FAQ
┌──────────────────────────────────────────────────────┐
│ │
│ 🟢 ← Green bubble (left edge, slides out on hover) │
│ │ │
│ │ ┌─────────────────────────┐ │
│ │ │ ⏱ TIME HOOKER │ │
│ │ │ 2x │ │
│ │ │ ┌──────┬──────┬──────┐ │ │
│ │ │ │ 0.1x │ 0.25x│ 0.5x │ │ │
│ │ │ ├──────┼──────┼──────┤ │ │
│ │ │ │ 0.75x│ 1x │ 1.5x │ │ │
│ │ │ ├──────┼──────┼──────┤ │ │
│ │ │ │ [2x] │ 3x │ 5x │ │ │
│ │ │ ├──────┼──────┼──────┤ │ │
│ │ │ │ 10x │ 20x │ │ │ │
│ │ │ └──────┴──────┴──────┘ │ │
│ │ │ Fine-tune ──●────── 2x │ │
│ │ │ [Custom____] [Set] │ │
│ │ │ Hook Active [●━━] │ │
│ │ │ Alt+T Alt+R Alt+↑/↓ │ │
│ │ └─────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────┘
A translucent green bubble peeks from the left edge. Hover to reveal it, click to open the full control panel.
| Feature | Description |
|---|---|
| 🚀 Speed Presets | One-click buttons: 0.1x 0.25x 0.5x 0.75x 1x 1.5x 2x 3x 5x 10x 20x |
| 🎚️ Fine-Tune Slider | Continuous range from 0.05x to 25x with 0.05 step precision |
| ✏️ Custom Speed | Type any value from 0.01x to 100x |
| ⏸️ Freeze Time | Set to 0.1x or lower to virtually freeze animations/timers |
| 🔄 Instant Reset | One shortcut (Alt+R) snaps back to real-time 1x |
| 🎨 Non-Intrusive UI | Translucent bubble hides at screen edge; Shadow DOM isolates all CSS |
| 💾 Persistent Speed | Your chosen speed survives page reloads (saved in localStorage) |
| 🌐 Universal | Works on every website — @match *://*/* |
| ⌨️ Keyboard Driven | Full keyboard shortcut support for power users |
| 🔒 Zero Permissions | @grant none — no special Tampermonkey permissions needed |
Time Hooker intercepts these core JavaScript timing APIs at document-start, before any page script loads:
| API | Effect |
|---|---|
setTimeout / clearTimeout |
Delays are divided by the speed multiplier |
setInterval / clearInterval |
Intervals are recalculated; live intervals restart on speed change |
Date / Date.now() |
Virtual clock runs at the chosen speed |
performance.now() |
Scaled to match the virtual clock |
requestAnimationFrame |
Callbacks receive virtual timestamps |
Example: At
2xspeed, asetTimeout(fn, 1000)fires after 500ms real time. At0.5x, it fires after 2000ms.
You need a userscript manager extension:
| Browser | Extension | Link |
|---|---|---|
| Chrome / Edge / Brave | Tampermonkey | Chrome Web Store |
| Firefox | Tampermonkey | Firefox Add-ons |
| Safari | Tampermonkey | Mac App Store |
| Any | Greasemonkey | Firefox Add-ons |
+ tab to create a new script.TimeHooker.user.js and paste it in.Ctrl+S (or Cmd+S) to save.| Shortcut | Action |
|---|---|
Alt + T |
Toggle the control panel open/closed |
Alt + R |
Reset speed to 1x (real-time) |
Alt + ↑ |
Step speed up to the next preset |
Alt + ↓ |
Step speed down to the previous preset |
Tip: When between presets (e.g. from the slider),
Alt+↑/↓will multiply/divide by 1.5x instead.
┌─────────────────────────────────────────────────┐
│ @run-at document-start │
│ │
│ 1. Save references to REAL timing APIs │
│ 2. Replace them with hooked versions │
│ 3. Virtual clock tracks "fake" elapsed time │
│ 4. Speed change → recalibrate baselines │
│ (no time-jump on speed switch) │
│ 5. All live setIntervals are restarted │
│ 6. Shadow DOM UI injected when <body> exists │
│ │
│ Page scripts only ever see the hooked APIs │
└─────────────────────────────────────────────────┘
Key design decisions:
@grant none — Runs in the page's own JS context so window.setTimeout etc. are the real page globals, not a sandbox copy.@run-at document-start — Hooks are installed before the page's own <script> tags execute, so nothing escapes.TimeHooker/
├── TimeHooker.user.js # The userscript (install this)
├── README.md # You are here
├── LICENSE # MIT License
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
└── .github/
└── ISSUE_TEMPLATE/
├── bug_report.md # Structured bug report template
└── feature_request.md # Feature request template
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License — see the LICENSE file for details.
If you find Time Hooker useful, please consider giving it a ⭐ — it helps others discover the project!