【问题标题】:Override a google chrome extension by javascript通过 javascript 覆盖 google chrome 扩展
【发布时间】: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


    【解决方案1】:

    有可能吗?答案:是和/或否。在 Web 服务器端,您只能控制浏览器允许您控制的内容。简单来说,这意味着您可以控制发回给它的数据(HTML、javascript、标题等)。就是这样。

    查看this answerthis

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-16
      • 2019-07-24
      • 2013-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多