Default avatar
npub17msr...c8dz
npub17msr...c8dz
This widget fetches a random joke from an API and displays it. Click the 'Get Joke' button to fetch a new joke. ``` <html><head><style>body{font-family:sans-serif;display:flex;justify-content:center;align-items:center;height:100vh;flex-direction:column;gap:20px;margin:0;background-color:#f0f2f5;}button{padding:10px 15px;border-radius:5px;border:none;background-color:#4CAF50;color:white;cursor:pointer;}#joke{padding:20px;border:1px solid #ccc;border-radius:5px;text-align:center;width:80%;max-width:500px;}</style></head><body><h3>Joke Widget</h3><div id='joke'>Click 'Get Joke' to see a joke!</div><button onclick='getJoke()'>Get Joke</button><script>let hostOrigin = null;SWhandler.client.ready();const listener = SWhandler.client.listen(e => {if (e.kind === 'user-metadata' && e.data?.host_origin) {hostOrigin = e.data.host_origin;}});async function getJoke() {try {const response = await fetch('https://v2.jokeapi.dev/joke/Programming,Christmas?blacklistFlags=nsfw,racist,sexist,explicit&safe-mode');const data = await response.json();let jokeText = '';if (data.type === 'single') {jokeText = data.joke;} else {jokeText = `${data.setup}<br>${data.delivery}`;}document.getElementById('joke').innerHTML = jokeText;} catch (error) {console.error('Error fetching joke:', error);document.getElementById('joke').innerHTML = 'Failed to fetch joke. Please try again.';}}</script></body></html> ```
I analyzed a Nostr post with NostrMood! Sentiment: Positive (+4) Original post: "bitchat, meshnets, and cashu are having a massive moment right now tons of interest, absolutely lov..." #NostrMood #SentimentAnalysis #Nostr
I analyzed a Nostr post with NostrMood! Sentiment: Positive (+7) Original post: "# What have you #sold for #Bitcoin this week? Hey Bitcoiners, Leave a comment below to share your ..." #NostrMood #SentimentAnalysis #Nostr
I analyzed a Nostr post with NostrMood! Sentiment: Positive (+7) Original post: "# What have you #sold for #Bitcoin this week? Hey Bitcoiners, Leave a comment below to share your ..." #NostrMood #SentimentAnalysis #Nostr
I analyzed a Nostr post with NostrMood! Sentiment: Positive (+7) Original post: "# What have you #sold for #Bitcoin this week? Hey Bitcoiners, Leave a comment below to share your ..." #NostrMood #SentimentAnalysis #Nostr
I analyzed a Nostr post with NostrMood! Sentiment: Positive (+7) Original post: "# What have you #sold for #Bitcoin this week? Hey Bitcoiners, Leave a comment below to share your ..." #NostrMood #SentimentAnalysis #Nostr
I analyzed a Nostr post with NostrMood! Sentiment: Positive (+7) Original post: "# What have you #sold for #Bitcoin this week? Hey Bitcoiners, Leave a comment below to share your ..." #NostrMood #SentimentAnalysis #Nostr