Closed xcfstudio closed 3 months ago
wtf is this issue i dont know if its the translator or what but the title doesnt make any sense
Do you want me to show you how you feel? Do you want me to show you how you feel when you wake up?
I'm sure it's a translation issue @Mrgaton
function checkCtx(filename) {
return new Error().stack
?.split('\n')
.slice(2)
.some((e) => e.includes(filename));
}
function override(obj, key, convert) {
const d = Object.getOwnPropertyDescriptor(obj, key);
Object.defineProperty(obj, key, Object.assign({}, d, convert(d)));
}
override(window, 'setInterval', ({ value }) => ({
value(fn, t) {
checkCtx('your-script.js') && ('' + fn).includes('ondevtoolclose')
? console.log('disabled setInterval')
: value.call(this, fn, t);
},
}));
@Cubxx what is "your-script.js" ?
@Cubxx what is "your-script.js" ?
checkCtx
means to check whether window.setInterval
is be called in the specific script file, it's just a supplementary measure, not core.
Actually, everything in JS can be override easily, so it just provide a idea, maybe not the best implement.
可以用控制台的【源代码/来源】面板中的【替换】功能,大致步骤如下
DisableDevtool({url:'xxx',md5:'xxx',ignore:()=>'xxx'});
接下来对它进行本地替换即可好了,大功告成