An open API service indexing awesome lists of open source software.

https://github.com/MarketingPipeline/Emoji-Fallback.js

Provide support for emojis on ALL web browsers!
https://github.com/MarketingPipeline/Emoji-Fallback.js

emoji emoji-fallback emoji-polyfill emoji-support emoji-unicode emojis emojis-support front-end front-end-development frontend html javascript modenizer modernizr polyfill twemoji user-experience web-development website

Last synced: about 1 month ago
JSON representation

Provide support for emojis on ALL web browsers!

Awesome Lists containing this project

README

          

# Emoji-Fallback.js
Replaces emoji characters with emoji images on devices that do not have emoji support with image emojis using Twemoji if needed.

> Some older device's do not have emoji support and some emojis are shown as text character's like this or sometimes not all. This script provides support on ALL devices by checking if there is emoji support on the device - if no emoji support is detected, then emoji's are replaced with images. For example: will become replaced with a img of a smiley face on a device with no emoji support.
>
> Currently on Windows, most emojis are supported, except for national flags such as 🇺🇸. When such cases are detected, this script will replace only the flag emojis with images.

## Example and usage

You can view a demo of Emoji Fallback in use [here.](https://marketingpipeline.github.io/Emoji-Fallback.js)

How to use Emoji-Fallback.js:

```html

Emoji-Fallback.js Basic Example


import {
emojiFallback,
emojiSupported
} from "https://cdn.jsdelivr.net/gh/MarketingPipeline/Emoji-Fallback.js@latest/dist/emoji-fallback.min.js";

!async function() {
const isSupported = emojiSupported();
console.log(`Emoji supported: ${isSupported}`);
if (!isSupported) {
await emojiFallback();
console.log("Emoji's rendered via fallback");
}
}()
emojiFallback();

```

For more advanced usage - see documentation [here](https://github.com/MarketingPipeline/Emoji-Fallback.js/wiki).

## Contributing ![GitHub](https://img.shields.io/github/contributors/MarketingPipeline/Emoji-Fallback.js)

Want to improve this? Create a pull request with detailed changes / improvements! If approved you will be added to the list of contributors of this awesome project!

See also the list of
[contributors](https://github.com/MarketingPipeline/Emoji-Fallback.js/graphs/contributors) who
participate in this project.

## License ![GitHub](https://img.shields.io/github/license/MarketingPipeline/Emoji-Fallback.js)

This project is licensed under the MIT License - see the
[LICENSE.md](https://github.com/MarketingPipeline/Emoji-Fallback.js/blob/main/LICENSE) file for
details.