How can I fix WebStorm warning “Unresolved function or method” for “require” (Firefox Add-on SDK)

Do you mean that require() is not resolved? You need to either add require.js to your project or enable Node.js Globals predefined library in Settings/Languages and Frameworks/JavaScript/Libraries. (Edited settings path by @yurik) In WebStorm 2016.x-2017.x: make sure that the Node.js Core library is enabled in Settings (Preferences) | Languages & Frameworks | Node.js and NPM … Read more

How can my Add-on SDK content script interact with a website page script?

There are a multitude of ways to interact with page scripts, the most common of which are covered in the official documentation, including all of the ways listed in the question. Please read “Interacting with page scripts”. However, it should be pointed out that interacting with page scripts in a secure fashion can be hard. … Read more

Firefox extension custom fonts

If you look into the console messages, this is what you should see: downloadable font: download not allowed (font-family: “FontAwesome” style:normal weight:normal stretch:normal src index:0): bad URI or cross-site access not allowed Unfortunately for you, web fonts are subject to the same-origin policy which can only be relaxed via CORS. This means that there is … Read more

Firefox extension .xpi file structure: description, contents, creation, and installation

.xpi file format (Extension Packaging) The .xpi files that are used as containers for Mozilla (Firefox, Thunderbird, etc.) extensions are merely zip archives that have had the file extension changed to .xpi with the files added to the archive using either “deflate” compression, or uncompressed. If you use any other type of compression, other than … Read more