I'm exploring the idea of having an encrypted chat on all websites I visit. The chat could allow me to leave messages on the website for my friends, send hidden post on Facebook, chat with all people currently visiting a site in an chat room dedicated to the current domain ....

What do you think? What could be done?
Is it even possible to have a consistent connection (for non single pager sites)?

https://openuserjs.org/scripts/select/Chat_Everywhere
https://conversejs.org

Re: @select:
You could have every page run a hidden dummy iframe of a non existent domain and then every page can use that domain for storing cookies, sessions, GM values etc.