A button to POST an emoji to an endpoint.

Overview

<open-heart>

A button for the Open Heart Protocol.

🚧 Highly experimental. Tag a version to avoid unexpected changes.

Usage

<!-- Include `OpenHeartElement` -->
<script src="https://unpkg.com/open-heart-element" type="module" defer></script>

<!-- Render `<open-heart>` -->
<open-heart href="https://httpbin.org/post?id=x" emoji="❤️"></open-heart>

This sends a POST to the href with ❤️ in the body, and sets a key in localStorage to remember that a heart has been sent for this href.

Styling

This element does not come with any styling. Feel free to take whatever that's on the demo page.

If you wrote some cool CSS for this, feel free to send a pull request with a demo page and I can list it here for others to reference:

Attributes

Functional

  • href: Required. Specify a URL where a POST request would be sent to.
  • emoji: Required. Specify an emoji.

States

  • [disabled]: Present when a heart has been sent.
  • [aria-pressed="true"]: Present when a heart has been sent.
  • [aria-busy="true"]: Present when a heart is being sent.

API

  • openHeart.getCount(): Sends a GET request to href, expects a JSON response like {'${this.emoji}': count} and sets <open-heart count="${count}"> if successful.

Event

  • open-heart: Bubbles. This is dispatched after a reaction is sent.
You might also like...

Emojion - Create and share images combined emoji and text

Emojion - Create and share images combined emoji and text

🚀 Emojion Emojion is a web application to create and share images combined an emoji and text. Your contribution is welcome! Concepts Simple Since the

Oct 14, 2022

A Chromium extension that enables users to use customizable :emoji: on Facebook/Facebook Messenger.

:emoji: for Messenger A Chromium extension that enables users to use customizable :emoji: on Facebook/Facebook Messenger. Install Download the extensi

Aug 31, 2022

Vanilla javascript emoji picker

Vanilla javascript emoji picker

FG Emoji Picker - Emoji picker created with vanilla javascript This is the simplest to use emoji picker built with vanilla javascript. Benefits: It is

Dec 16, 2022

This extension injects a button to the Google Drive WebUI.

This extension injects a button to the Google Drive WebUI.

This extension injects a button to the Google Drive WebUI. When clicking on it the current folder id is send to your gogdl-ng instance. It was developed and tested on the latest version of Mozilla Firefox and Chrome.

Jul 13, 2022

TRAB is a Chrome extension that gives you a single button to mark tweet as spam, and block the tweet's creator

TRAB is a Chrome extension that gives you a single button to mark tweet as spam, and block the tweet's creator

TRAB - Tweet Reporter and Blocker TRAB is a Chrome extension that gives you a single button to do two things with a single click: Mark a Tweet as spam

May 4, 2022

MPVPlay is an MPV play button integration for YouTube Web.

MPVPlay is an MPV play button integration for YouTube Web.

MPVPlay MPVPlay is a combination of a `.desktop` file and a userscript that allows you to play YouTube videos directly in MPV with the click of a butt

Apr 17, 2022

Garfield Whatsapp 🐼 Userbot is a button 🦋 bot that operates 24×7 Hour powered By X-nodes server

Garfield Whatsapp 🐼 Userbot  is a button 🦋 bot that operates 24×7 Hour powered By X-nodes server

GARFIELD WHATSAPP USER BOT LATEST VERSION (Button Update 🦋 And 24×7 hour Working 🐼 ) New Features and upgrades v8.0 🧬 🦋 Bot continues to work even

Dec 4, 2022

Finally, a "back to top" button that behaves like a real elevator.

elevator.js Finally, a "back to top" button that behaves like a real elevator, by adding elevator music to quietly soothe the awkwardness that can ens

Dec 27, 2022

pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles, and a working back button.

pjax = pushState + ajax pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles,

Jan 5, 2023
Easily add emoji support to your website! Replace keywords with emoji's :yum:

Emoji-Parser.js ?? A emoji parser to easily add emoji support to your website Show your support! Features: Use's the same style GitHub does! TON's of

Marketing Pipeline 13 Sep 9, 2022
A web app to post emoji implemented in connect-go and connect-web.

emotter Emotter is an app to post and share single emoji. This is an example app of connect. Example https://emotter.syumai.com API: Cloud Run Web cli

syumai 11 Oct 30, 2022
A plugin for Strapi CMS that adds a preview button and live view button to the content manager edit view.

Strapi Preview Button A plugin for Strapi CMS that adds a preview button and live view button to the content manager edit view. Get Started Features I

Matt Milburn 53 Dec 30, 2022
Create Bootstrap 5 Modal Box using JavaScript with custom title, description, button labels and custom YES button callback

Dynamic BS5 Modal Box Create Bootstrap 5 Modal Box using JavaScript with custom title, description, button labels and custom YES button callback Insta

null 5 Oct 23, 2022
This project is built with JavaScript, Webpack, HTML & CSS, Leaderboard api. When user clicks on Refresh button it hits the api and responds with the data, The user can also post data to the api

leaderboad Description the project. this project is about the leaderboad i did during Microverse to build a website for adding Data to the API and fet

Emmanuel Moombe 4 May 30, 2022
Move all the disks from the left hand post to the right hand post, only moving the disks one at a time and a bigger disk can never be placed on a smaller disk.

Hanoi Tower Description The Tower of Hanoi was a famous problem posed by a mathematician in 1883, The "puzzle" is to move all the disks from the left

Dustin J Sellers 1 Feb 5, 2022
O projeto MKS Sistemas tem como objetivo o desenvolvimento de uma aplicação em React que utilize endpoint da API de produtos fornecida pela própria MKS Sistemas.

MKS front-end Descrição O projeto MKS Sistemas tem como objetivo o desenvolvimento de uma aplicação em React que utilize endpoint da API de produtos f

Rodrigo William 4 Jul 21, 2022
Custom endpoint to backup the PG database and upload the `.dump` to Directus.

Directus Backup Endpoint Custom Directus endpoint to backup Postgres database using pg_dump and upload the .dump file into Directus files. Usage Clone

Guilherme Oliveira 7 Dec 21, 2022
View a GCP project's API/service endpoint configurations.

GCP Service Observer This is an application that displays GCP Service/API endpoint information for a given project. GCP requires API endpoints to be e

Jason Dyke 9 Dec 28, 2022
Provides intellisense, search and preview of emoji

Features Suggest emoji names after typing : or / (can be changed) Browse emojis by category Fuzzy search emojis Intellisense emojiIntellSense.language

Xiaoqian Zhang 5 Oct 15, 2022