Time Control

Script allowing you to control time.

当前为 2024-03-30 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
AGitUser0001
评分
0 0 0
版本
1.2
创建于
2024-03-30
更新于
2024-03-30
大小
4.5 KB
许可证
MIT
适用于
所有网站

This script creates a global window.time object that allows you to control time in a webpage.

The window.time object contains:

  • get, set time.scale: number: The current scale that time moves at. When set, changes the scale and sets pristine to false.
  • get, set time.now: number: The current time on the page. Should be equal to window.Date.now(). When set, time jumps to the set time.

  • get time.real: number: The actual time grabbed from DateConstructor.now().

  • get, set time.debug: boolean: A boolean that controls logging of calls.

  • get, set time.pristine: boolean: Whether time has been modified. When set, if set to true, syncs time.

  • time.jump(newTime: number): undefined: Jumps time to newTime, a number.

  • time.sync(resetScale: boolean = true): undefined: Syncs time with real time, optionally resetting the scale.