Incorporating 3rd Party Module Into Addon

I’m having problems reading the contents of the clipboard (see here and here).

I’ve found a library on GitHub, Clipboardy, that seems to do everything that I want to do.

Aside from the obvious (not minimizing code so that the review progresses properly), how do I incorporate this code into my addon?

It’s pretty large (about 1 mb).

Clipboardy seems to use binary components for windows (.exe files) in

I’m pretty sure that would never be allowed in a WebExtension.

It simply won’t work because it is a node.js module, not at all meant for the browser (and looking at the code for a couple of seconds it seems to be a pretty poor one as well).

There were some changes to clipboard reading in Firefox 63, and whether and how you can read the clipboard depends on when and from where you want to read.

If you have a page open, the user clicks a button in it and you directly read the clipboard, it should be rather simple.
If you just randomly want to read the clipboard from the background, it may not work at all.

You should read the blog post about new WebExtension APIs in FF63!

I agree with you that if the updated features make it a f%$# load easier, but based on my years of dealing with software as a consumer, (Mechanical Engineer) I have a couple of rules for this stuff:

  1. Don’t plan on a future release, even if in beta, going release with the promised features.
  2. Wait until at one bug fix release before counting on those features.
  3. Software is always late.

Gotta link to the blog post?

Yeah, but I don’t think there is much that can go wrong with this simple API:

https://blog.mozilla.org/addons/2018/08/31/extensions-in-firefox-63/