Ultimately I'd like to use libomemo.js, but it's not yet ready https://github.com/conversejs/libomemo.js