There is a bug[1] preventing bookmarklets from working correctly in Firefox. To work around this bug, it is possible to use extensions, which can execute all (including potentially unsafe) browser code. One option is to use the "Custom buttons" extension[2] and create custom buttons which execute your Javascript code.

My example case: In my .keysnailrc I have this function:

        function (aEvent, aArg) {
          var od = window.content.document;
}, M({en: "Save bookmark in Emacs org-mode using org-protocol"}));

Running the function sends a bookmark to Emacs org-mode capture.

To call the function from a custom button, I use this code:



[1] 866522 – bookmarklets affected by CSP. [ bib | http ]
[2] Custom buttons :: Add-ons for firefox. [ bib | http ]