Make extension Electrolysis compatible

I found what made framescript, and chromeworker, messaging super easy for me, is creating functions on both sides which can call “functions” in the other side. Then setup a callback to run. And the other side can return a promise if they aren’t doing sync stuff.

Its not so intuitive how i did things but once you figure it out its super easy, you can make your own version too. This is my framescript communication “api”: https://gist.github.com/Noitidart/03c84a4fc1e566bd0fe5

You can see me using it here: https://addons.mozilla.org/en-US/firefox/addon/tweeeeeeeeeeeeeeeeeeter/ and i can give you more examples if you want to see this for inspiration or using it yourself.