this script allows you to toggle it via pressing g the button can be changed via changing if (event.key === 'g'), to change it, change the 'g' to the keybind you want. And you might want to change return window.original() * 21; to a diffrent value then 21 and you might want/have to change the spacing of the script cause I dont think its spaced like it should be in this comment. Take care
window.isActive = false;
window.original = null;
function toggleFunction() {
if (window.isActive) {
// Restore the original function
Date.now = window.original;
} else {
// Store the original function
window.original = Date.now;
// Replace the function with our modified version
Date.now = function() {
return window.original() * 21;
};
}
// Flip the active state
window.isActive = !window.isActive;
}
// Listen for the keydown event
window.addEventListener('keydown', function(event) {
// Check if the 'G' key was pressed
if (event.key === 'g') {
// Call the toggle function
toggleFunction();
}
});
this script allows you to toggle it via pressing g the button can be changed via changing if (event.key === 'g'), to change it, change the 'g' to the keybind you want. And you might want to change return window.original() * 21; to a diffrent value then 21 and you might want/have to change the spacing of the script cause I dont think its spaced like it should be in this comment. Take care
window.isActive = false; window.original = null;
function toggleFunction() { if (window.isActive) { // Restore the original function Date.now = window.original; } else { // Store the original function window.original = Date.now; // Replace the function with our modified version Date.now = function() { return window.original() * 21; }; } // Flip the active state window.isActive = !window.isActive; }
// Listen for the keydown event window.addEventListener('keydown', function(event) { // Check if the 'G' key was pressed if (event.key === 'g') { // Call the toggle function toggleFunction(); } });