Any way to open scratchpad from an extension?

I’m looking to add a small multi-line edit box to the preferences of one of my add-ons, which will be for editing snippets of Javascript.

Is there any way to leverage Scratchpad for this?

I don’t need the script to be runnable, really this is just to do a little syntax-highlighting, but auto-completion and the like would be nice.

Because they’ll only be snippets, it’d be overkill to include a large amount of extra code for this, and I was just wondering if there a was a nice “quick win” for this sort of thing?

Nope, you can’t load any of the browsers scripts or embed its UI elements.

I even tried to load a resource:// script:

Content Security Policy: The page’s settings blocked the loading of a resource at resource://activity-stream/vendor/Redux.jsm (“script-src”).

You will have to bring it yourself.

1 Like