How to add the Nostr chat button to any website
I'm on Nostr, this website runs on Ghost. Any Nostrich can DM me directly from this site.
To use the chat button requires Nostr users to have a browser extension installed, like Alby, Amber, Nos2x-fox, or Flamingo, to automatically sign the post (event).
<!-- CSS for positioning the widget. -->
<style>
html.has-dark-text body.page-template.page-contact.has-sans-title.has-sans-body iframe#decentralised-chat {
position: relative;
margin-right: -35px;
margin-left: auto;
margin-bottom: 42px;
z-index: 1000;
}
</style>
<!-- JavaScript for loading the widget. -->
<script>
var w = window, d = document;
w.decenChat = {
appId: '7b43b1cba4f78d8e684a81a0cf5fcd4ff41e0b06411ba840d675cabb9e0d45a3'
};
var e = function() {
var s = document.createElement('script');
s.src = 'https://client.decenchat.com/widget.js';
d.body.appendChild(s);
}
d.readyState !== 'loading' ? e() : w.addEventListener("DOMContentLoaded", e);
</script>
- This code goes in the footer section of the site or individual page you want the icon to appear.
- Preview.
- To move the position of the icon, play with the CSS values for margin-right: and margin-bottom:
Everything else, I would leave as is.
Encourage your users to sign up to Nostr and use the chat option
You can send a DM via the chat button without being on Nostr now. Nostr will sign you up automatically! But without knowing the keys to your account, there's no way to retrieve a reply! Which is why I have provided the following solution.
- For those who prefer reading here is : How to sign up to Nostr and install a browser extension.
- If you are a webmaster, by all means repurpose the text your own way.
- For Youtube University students, here's a video I made earlier. It is hosted on Nostr.Build - Super fast to load, and no tracking!
nostr.build media uploader
Image, video and media uploader for nostr, damus, astral.ninja, snort.social, and most all nostr clients. Upload any kind of media and get a link to post, or use our iOS app to automatically uppload images straight from your keyboard.
I'll zap 100 sats by way of a "hello" to any new community members who DM me via the chat.
- Join us for a pitch on the store front
- Join to buy a micro-website like this, and benefit from being a part of the Olive Grove Eggs community marketing effort.
- Join as a subscriber to the monthly Rare as Chickens' Teeth newsletter, free or $5/month - or free and zap some sats as and when.
Any other chat solutions, please share.
Here's one, Corny Chat. I will be setting up an audio chat aka meeting from time to time.

