我想更改网页显示的部分内容,是否可以用usercript覆盖一个函数?
下面是我想覆盖的功能(也可以在这里找到):
function StartDrawing() {
if ((typeof (systemsJSON) != "undefined") && (systemsJSON != null)) {
var stellarSystemsLength = systemsJSON.length;
$('#mapDiv').empty();
if (stellarSystemsLength > 0) {
InitializeRaphael();
var i = 0;
for (i = 0; i < stellarSystemsLength; i++){
var stellarSystem = systemsJSON[i];
DrawSystem(stellarSystem)
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
这将允许我运行自己的绘图算法.
如何使用chrome(或Firefox)中的用户脚本执行此操作?