I am trying to make a extension that when i click extension icon it will show me a simple popup . in popup html i have few link with radio button. it should work when i click on radio button it will redirect the link.
<html>
<head>
<script>
function OpenWindow(){
for(i=0;i<document.FormLink["RB1"].length;i++){
if(document.FormLink["RB1"][i].checked){
window.open(document.FormLink["RB1"][i].value);
break;
}
}
}
<script>
</head>
<body>
<input type="radio" onchange="window.location.replace('https://google.com.com')">Google<br/>
<input type="radio" onchange="window.location.replace('https://bing.com')">Bing<br/>
<form name="FormLink">
<input type="radio" name="RB1" value="https://yahoo.com">Yahoo!<br/>
<input type="radio" name="RB1" value="https://yahoo.com">None!<br/>
<form>
<body>
</html>
I save this as popup.html
i want to run it through chrome extension but i found error it shows me
Refused to execute inline script because of Content-Security-Policy
my menifest.json file
"background": {
"persistent": false,
"scripts": [ "background.js" ]
},
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"manifest_version": 2,
"name": "My Extension",
"permissions": [ "tabs","<all_urls>" ],
How can i solve my problem. it will be better for me if anybody can give me some correct code that will run as i want in my extension