Time Control

Script allowing you to control time.

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The window.time object contains:

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

  • sync(syncTime: boolean = true, syncScale: boolean = true): void: Optionally syncs the scale and/or time with real time in the page.

  • storage

    • save(saveTime: boolean = true, saveScale: boolean = true): void:
    • load(loadTime: boolean = true, loadScale: boolean = true): void: Saves or loads the current time and/or scale in script storage.
    • reset(resetTime: boolean = true, resetScale: boolean = true): void: Resets the time and/or scale in script storage.
    • get time.now(): number: The current time in the script storage.
    • set time.now(value: number): void: Time is set to value in the storage.
    • get pristine(): boolean: Whether time has been modified in the storage.
    • set pristine(value): void: If value is true, syncs time to real time in storage.
    • get time.scale(): number: The current scale that time moves at in the storage.
    • set time.scale(value: number): void: When set, changes the scale of time in storage.
  • get time.debug(): boolean:

  • set time.debug(value: boolean): void: A boolean that controls logging of calls.

  • get time.now(): number: The current time on the page. Should be equal to window.Date.now().

  • set time.now(value: number): void: Time jumps to value.

  • get pristine(): boolean: Whether time has been modified.

  • set pristine(value): void: If value is true, syncs time.

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

  • get time.scale(): number: The current scale that time moves at.

  • set time.scale(value: number): void: When set, changes the scale of time.