嗨,我正在尝试制作一个 Google chrome 扩展程序,该扩展程序将在浏览器上具有一个按钮,单击该按钮时将打开一个带有此站点http://www.visualbounds.com/Private/XboxMB/Chatbox/的气泡弹出窗口。但我是新手,当我尝试使用 iframe 时,弹出窗口中没有任何内容。
所以我想我在问如何将网站嵌入到弹出窗口中?
如果有帮助,这是 manifest.json。
{
"browser_action": {
"default_icon": "Images/16.png",
"default_popup": "popup.html"
},
"background": {
"persistent": false,
"scripts": [ "background.js" ]
},
"content_scripts": [ {
"js": [ "jquery.js", "script.js" ],
"matches": [ "https://www.xboxmb.com/*" ],
"run_at": "document_start"
},{ "matches": ["http://*/*", "https://*/*" ],
"all_frames": true,
"js": ["content.js"]
}
],
"description": "Chat intergration for XboxMB",
"icons": {
"16": "Images/16.png",
"48": "Images/48.png"
},
"manifest_version": 2,
"name": "XboxMB Chatbox",
"options_page": "options.html",
"version": "2.2",
"permissions": [
"http://www.visualbounds.com/Private/XboxMB/Chatbox/mobile.html"
]
}
这是popup.html
<!doctype html>
<html>
<head>
<style type="text/css">
body {width:200; height:300;}
</style>
</head>
<body>
<iframe src="http://www.visualbounds.com/Private/XboxMB/Chatbox/mobile.html" width="100%" height="100%" frameborder="0">
</iframe>
</body>
</html>
任何帮助将非常感激。
亲切的问候
-肖恩