下面这个脚本:#content_script.js,这是为获得其在参数传递的值注入代码的方式。原生浏览器注射
或者更明确(它可以是任何JavaScript的功能):
(function() {
var parse = JSON.parse;
JSON.parse = function(){
console.log('Getting params: ', arguments);
return parse.apply(JSON, arguments)
};
JSON.parse.toString = function(){ return 'function parse() { [native code] }' };
var wss = WebSocket.prototype.send;
WebSocket.prototype.send = function(){
console.log('Getting params', arguments);
return wss.apply(this, arguments)
}
WebSocket.prototype.send.toString = function(){ return 'function send() { [native code] }' }
})();
但是,在线游戏我的情况是我不应该使用这种方法,而不是我想将它注入JavaScript引擎(Native Code
)。不完全我想知道如何发展,如果不是,我该怎么做?如果我必须使用另一种编程语言或某种方法来做到这一点?
注意我有一个错误:在新打开的标签它不是运行脚本,我不得不考虑的是,将在位 – Noitidart
做我现在会检查它 –
@wZVanG这个简单的插件如果你在龙站点打开的时候启用/安装它,它将不会出现问题,并且你只有一个带有选项卡的Firefox窗口,如果你有多个你必须使用迭代器来遍历所有窗口并附加。 – Noitidart