Based on the example from MDN, I've created my own extension that showing just a 'hi' message. I've included a file named "popup.js" via tag. But this file is not getting executed.
This is my manifest.json file:
{
"manifest_version": 2,
"name": "Ext",
"version": "1.0",
"description": "Shows a hi message.",
"icons": {
"48": "icons/ff.jpg"
},
"permissions": ["tabs"],
"browser_action": {
"default_icon": "icons/toggle-off.png",
"default_title": "EXT",
"default_popup": "popup/popup.html"
}
}
This is my popup.html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h2>Hi</h2>
<script src="popup.js"></script>
</body>
</html>
There is only a single line in my popup.js file. That is,
console.warn("This is a warning");
But I can't see anything in the console. The pop-up is showing properly when I click on the extension icon.
I don't know what am missing here. Any help is appreciated!