Last active
November 7, 2023 18:24
-
-
Save DungGramer/08b68f0cac10d7ab75ead96dd1c17fb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Instant setInterval Execution | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *://*/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const originalSetInterval = window.setInterval; | |
window.setInterval = function (callback, delay, ...args) { | |
console.log('------interval callback--------'); | |
console.dir(callback); | |
// Return a dummy interval ID | |
return originalSetInterval(callback, 0, ...args); | |
}; | |
const originalSetTimeout = window.setTimeout; | |
window.setTimeOut = function (callback, delay, ...args) { | |
console.log('------timeout callback--------') | |
console.dir(callback); | |
// Return a dummy interval ID | |
return originalSetTimeout(callback, 0, ...args); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment