【发布时间】:2018-08-29 03:33:02
【问题描述】:
如何停止/覆盖(我不知道 override 是否是正确的词)使用 javascript 的 google chrome 扩展中的函数?或者捕获一个扩展的变量名?
例如,minerBlock 扩展使用这个脚本来捕获 coinhive miner 的变量并停止它:
if( this[name]
&& typeof this[name] !== 'undefined'
&& typeof this[name].isRunning === 'function'
&& typeof this[name].stop === 'function'
&& typeof this[name]._siteKey === 'string'
) {
console.log('[+] Coinhive miner found, stopping...');
this[name].stop();
this[name] = null;
triggerMblockEvent('CoinHive (inline)');
}
谢谢!
【问题讨论】:
标签: javascript google-chrome google-chrome-extension overriding