Okay for now I believe this has been fixed. Please let me know if it works now.
Update: I looked into this and turns out even though the script is running from the document body it’s possible for document.body to not be available yet. This has been fixed now. Sorry for the inconvenience.