I don't understand

Reference: https://pastebin.com/raw/k82RVQxd

In miserable.js, what does “document” refer to?

Is there a flow-chart that describes the zig-zag way in which extensions have been built? Or rather, the way in which each piece interacts with each piece. I think I’m starting simply, and nothing works.

I’ve simplified my example, and still nothing.

https://pastebin.com/raw/ms1xRMUy

Why is this so difficult?

Never-mind. I’m skipping the UI part and will instead post the data back to my own server.

document represents background page, more details at: