Then Tuj went on to make Your Second Extension and rendered many sites useless. One clicks the add-on's icon to get a pop-up which contains a script that registers an event listener which listens for clicks in the pop-up. If a click is detected then it injects a script (which does unfun things) into the web page one is on. One should ask for permission to be able to inject scripts.
Tuj has a stupid question. The icon of the add-on is some black stuff on transparent background and Tuj's firefox is on dark theme. => Tuj cannot see the icon. :( Can one make the add-on's icon adapt to the environment, just as built-in Firefox icons such as the forward, the backward and the refresh buttons change to a paler colour when in dark mode? Tuj supposes that there is a way to listen for the theme change event and change icon accordingly. Googling shows that the
theme_icons key in the
manifest.json can solve the problem. See this page. Anyway Tuj digresses.
Then Tuj read Anatomy of an extension to get some overview. That's all for today.