What if you create a simple href with javascript function on the page.
How bookmarklets work.
Here is a sample code:
function(scriptUrl) { var newScript = document.createElement('script');
To use it, put your script url.
It should be only one line of code generated by the url, but for the readability of the code I created.
I never developed a Firefox extension, but for javascript injection, that I would give up. Hope this helps.
source share