1

Topic: Basic Iceweasel-UXP Extension Development

I have a simple extension that blocks text on the pages of one website.

How do I get the extension to execute my javascript whenever I'm on the website? Currently, it does not execute at all.

I've tried checking for the name of the website with

if ( window.location.hostname == "website.com")

I've also tried adding an event listener:

document.addEventListener("DOMContentLoaded", function(){ myfunction()});

But nothing in the script ever seems to execute. However, the code from my extension works if I run it in the browser console while I'm on the website.