替换debug

_setInterval = setInterval
setInterval = function setInterval(code, time){
    console.log(code, time)
    code = code.toString().replace(/debugger/, "").replace(/function ()/, "function aaa")
    return window._setInterval(new Function(code) , time)
}
_setTimeout = setTimeout
setTimeout = function setTimeout(code, time){
    console.log(code, time)
    code = code.toString().replace(/debugger/, "").replace(/function ()/, "function aaa")
    return window._setTimeout(new Function(code), time)
}

 

posted @ 2021-12-24 00:54  AngDH  阅读(34)  评论(0编辑  收藏  举报