I’m trying to make a simple extension, but can’t get any of my JavaScript to run. Yes, I did put it in a .js
file. Here is my code.
I install this using about:debugging
, click Inspect
, Disable Popup Auto-Hide
, click on my extensions button, the popup shows up, so does it’s html in the Inspector. So far so good, but my console.log
never prints to the console. The Debugger says This page has no sources.
. If I right-click popup.js
in Inspector and click Open File in Debugger.
, it opens in a new tab with a url like this view-source:moz-extension://73dc4249-14d4-4b56-9ffe-b39460fa969c/popup.js
instead. So I can’t run any JavaScript, nor can I debug it, but the browser does find it at least. I tried this on a new Firefox profile on Firefox 101.
I’m probably missing something obvious, but can’t figure out what…