因此,Chrome拥有疯狂的kerjigger,可以让用户安全地使用JavaScript。这是有道理的,我试图创建一个程序,可以保存书签,并立即打开它们用于学习目的和个人使用:)。我有以下代码但它只打开第一个链接。
popup.js:
window.open("https://www.google.com");
window.open("https://www.twitter.com")
popup.html:
<script src = "popup.js"/>
的manifest.json:
{
"manifest_version": 2,
"name": "SpeedyURLs",
"icons":
{
"19": "icon.png",
"128": "icon2.png"
},
"description": "This is a mass bookmark extension allowing you to open multiple bookmarks at once!",
"version": "0.1",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab",
"https://ajax.googleapis.com/"
]
}
它适用于JSFiddle和浏览器,我非常确定Chrome会阻止代码运行。有什么想法吗?