I am unable to trigger an alert()
popup with an onclick()
event.
Code
File manifest.json
{
"name": "Project",
"version": "1.0.0",
"manifest_version": 2,
"description": "Popup when website requires Log in",
"browser_action":{
"default_icon":"icon_19.png",
"default_popup":"Popup.html"
}
}
File Popup.html
<html>
<head></head>
<body>
<div class="plus" onclick="popup()"></div>
<script src="inline.js"></script>
</body>
</html>
File inline.js
function popup() {
var link = document.URL;
alert("This is the link: (" + link + ")");
}