我已经做了一个脚本,在谷歌Chrome扩展工程。我连忙解释道:有一个在线游戏叫Dragonbound。脚本所做的是计算你必须向对手射击的力量。好吧,我已经尝试在外部服务器上容纳我的脚本,显然已经加载但没有执行(“加载”)。我认为错误可能出在代码上(我使用了视频游戏的JavaScript来创建我的脚本)。代理原始代码,json和调用外部脚本的js:
Main Javascript in Codeviewer
Manifest.json
{
"name": "DragonBound Aimbot 2.0",
"version": "2.0.0",
"manifest_version": 2,
"description": "DragonBound Aimbot Hack - HTML5",
"browser_action": {
"default_popup": "popup.html",
"default_icon": "icon.png"
},
"permissions": ["tabs", "notifications", "http://*.dropbox.com/u/91461506/*", "https://*.dropbox.com/u/91461506/*"],
"background": { "page": "background.html", "persistent" : false },
"content_scripts": [
{
"matches": ["http://*.dragonbound.net/*","http://*.dropbox.com/u/91461506/*"],
"js": ["jquery2.js","DragonBoundAimbot.js"],
"run_at": "document_end"
}
],
"icons": {"16": "16.png", "48": "48.png", "128": "128.png"},
"web_accessible_resources": [
"ranks/*","48.png"
],
"homepage_url" : "http://www.dropbox.com"
}
- 代码调用外部脚本:
chrome.extension.sendRequest({type:"init"},function(response){
if(response.ingame){
chrome.extension.sendRequest({id:"loading",type:"notification2",text:["Loading","Loading scripts from dropbox.com..."]}, function(response) {});
chrome.extension.sendRequest({type:"loadscript",url:'http://dl.dropbox.com/u/91461506/prueba2.js',cache:false}, function(response) {
if(response.type == 1){
eval(response.scriptcontent);
}else if(response.type == 0){
chrome.extension.sendRequest({id:"loading",type:"closenotification2"}, function(response) {})
chrome.extension.sendRequest({id:"errorloading",time:0,type:"notification2",text:["Error","Failed to load the script, try again later"]}, function(response) {});
}
});
}else{
chrome.extension.sendRequest({type:"loadscript",url:'http://dl.dropbox.com/u/91461506/page.js',cache:false}, function(response) {
if(response.type == 1){
eval(response.scriptcontent);
PAGEDBA.init();
}else if(response.type == 0){
}
});
}
});
我已经上传了Google Chrome的扩展和未压缩的扩展:
Extension of Chrome .CRX
Estension uncompressed .ZIP
视频游戏的网页链接是DragonBound.net
1条答案
按热度按时间b5buobof1#
您使用
eval()
,但eval()
在chrome-extensions中被禁用。http://developer.chrome.com/apps/sandboxingEval.html