Fixed-value Scripts
# Fixed-value Scripts
These scripts provide a fixed return value by default. Press Enter to save after changing it.
| Hooked method | Original behavior |
|---|---|
Math.random | Returns a pseudorandom floating-point number |
Date.now | Returns the current timestamp |
performance.now | Returns a high-resolution timestamp |
# Parameters
| Parameter | Description |
|---|---|
| Fixed value | The fixed return value |
| Debugger | Pauses execution when the hook is triggered |
| Stack | Prints the call stack |
# Usage
Hook Math.random to return the fixed value 0 and print the call stack:

The printed stack:

# Frequently asked questions
# Why is there no console output after enabling the script?
console.log may have been disabled.
Try enabling hook log to prevent JavaScript from overwriting the logging method.
If there is still no output, contact the author with an example (WeChat: I-0xsdeo).