Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:) wrong repo, ignore #628

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/optimize-svgs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: optimize-svgs
run-name: Optimize SVG size with SVGO
on:
push:
branches:
- main
paths:
- '**.svg'
pull_request:
paths:
- '**.svg'

permissions:
contents: write
pull-requests: write

jobs:
run-svgo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ericcornelissen/svgo-action@v4
id: svgo
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
svgo-version: 3
- name: Commit optimizations
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{steps.svgo.outputs.DID_OPTIMIZE}}
with:
commit_message: Optimize ${{steps.svgo.outputs.OPTIMIZED_COUNT}} SVG(s)
- name: Comment on Pull Request
uses: thollander/actions-comment-pull-request@v1
if: ${{steps.svgo.outputs.DID_OPTIMIZE && github.event_name == 'pull_request'}}
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
message: Optimized ${{steps.svgo.outputs.OPTIMIZED_COUNT}} SVG(s)
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ have good reasons for rejecting.

If you'd like to test and/or contribute please follow these instructions.

[Fork this repo on GitHub](https://github.com/twitter/twemoji.git/fork)
[Fork this repo on GitHub](https://github.com/jdecked/twemoji.git/fork)

### Setup

Expand Down
10 changes: 3 additions & 7 deletions LEGACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@

### CDN Support

The folks over at [MaxCDN](https://www.maxcdn.com) have graciously provided CDN support.
Previously, MaxCDN provided support for V1 of the Twemoji API. MaxCDN shut down on December 31, 2022.

Use the following in the `<head>` tag of your HTML document(s):
Support for V1 of the Twemoji API is no longer available and is not planned. Please migrate to V2.

```html
<script src="https://twemoji.maxcdn.com/1/twemoji.min.js" crossorigin="anonymous"></script>
```

This guarantees that you are using the V1 version of the library.
The rest of this README is kept around for historical purposes and may not work as described.

### Download

Expand Down
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,19 @@ The Twemoji library offers support for all Unicode-defined emoji which are recom

### CDN Support

<del>The folks over at [MaxCDN](https://www.maxcdn.com) have graciously provided CDN support.</del>

MaxCDN is shut down right now, so in the meanwhile use a different CDN or download the assets. (See [Maxcdn has shut down, cdn not working anymore. · Issue #580 · twitter/twemoji](https://github.com/twitter/twemoji/issues/580)).
Default CDN support is provided via [jsDelivr](https://www.jsdelivr.com/).

Use the following in the `<head>` tag of your HTML document(s):

```html
<script src="https://unpkg.com/twemoji@latest/dist/twemoji.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@twemoji/api@latest/dist/twemoji.min.js" crossorigin="anonymous"></script>
```

This guarantees that you will always use the latest version of the library.

If, instead, you'd like to include the latest version explicitly, you can add the following tag:
```html
<script src="https://unpkg.com/twemoji@14.0.2/dist/twemoji.min.js" integrity="sha384-ICOlZarapRIX6UjKPcWKEpubjg7lGADN7Y9fYP4DU9zm0aPFhgnP5ef+XFaPyKv+" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@twemoji/api@14.1.1/dist/twemoji.min.js integrity="sha384-GWrfUNp6XiceGqVNiGL6eWR/731mM4Dhg3nur6EJGcYZKVZh8pIGXkMhO5XqjFRl" crossorigin="anonymous"></script>
```

### Download
Expand All @@ -39,9 +37,9 @@ Following are all the methods exposed in the `twemoji` namespace.

This is the main parsing utility and has 3 overloads per parsing type.

Although there are two kinds of parsing supported by this utility, we recommend you use [DOM parsing](https://github.com/twitter/twemoji#dom-parsing), explained below. Each type of parsing accepts a callback to generate an image source or an options object with parsing info.
Although there are two kinds of parsing supported by this utility, we recommend you use [DOM parsing](https://github.com/jdecked/twemoji#dom-parsing), explained below. Each type of parsing accepts a callback to generate an image source or an options object with parsing info.

The second kind of parsing is string parsing, explained in the legacy documentation [here](https://github.com/twitter/twemoji/blob/master/LEGACY.md#string-parsing). This is unrecommended because this method does not sanitize the string or otherwise prevent malicious code from being executed; such sanitization is out of scope.
The second kind of parsing is string parsing, explained in the legacy documentation [here](https://github.com/jdecked/twemoji/blob/master/LEGACY.md#string-parsing). This is unrecommended because this method does not sanitize the string or otherwise prevent malicious code from being executed; such sanitization is out of scope.

#### DOM parsing

Expand All @@ -61,7 +59,7 @@ var img = div.querySelector('img');
// note the div is preserved
img.parentNode === div; // true

img.src; // https://twemoji.maxcdn.com/v/latest/72x72/2764.png
img.src; // https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/72x72/2764.png
img.alt; // \u2764\uFE0F
img.className; // emoji
img.draggable; // false
Expand All @@ -78,7 +76,7 @@ Here's the list of properties accepted by the optional object that can be passed
{
callback: Function, // default the common replacer
attributes: Function, // default returns {}
base: string, // default MaxCDN
base: string, // default jsDelivr
ext: string, // default ".png"
className: string, // default "emoji"
size: string|number, // default "72x72"
Expand Down Expand Up @@ -136,7 +134,7 @@ twemoji.parse(genericNode, {
});
```

This will generate urls such `https://twemoji.maxcdn.com/svg/2764.svg` instead of using a specific size based image.
This will generate urls such `https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/svg/2764.svg` instead of using a specific size based image.

## Utilities

Expand Down Expand Up @@ -208,11 +206,11 @@ twemoji.parse(document.body, {

## Legacy API (V1)

If you're still using our V1 API, you can read our legacy documentation [here](https://github.com/twitter/twemoji/tree/master/LEGACY.md).
If you're still using our V1 API, you can read our legacy documentation [here](https://github.com/jdecked/twemoji/tree/master/LEGACY.md).

## Contributing

The contributing documentation can be found [here](https://github.com/twitter/twemoji/tree/master/CONTRIBUTING.md).
The contributing documentation can be found [here](https://github.com/jdecked/twemoji/tree/master/CONTRIBUTING.md).

## Attribution Requirements

Expand Down Expand Up @@ -242,8 +240,8 @@ However, we consider the guide a bit onerous and as a project, will accept a men

## Committers and Contributors

* Justine De Caires (Twitter)
* Jason Sofonia (Twitter)
* Justine De Caires (ex-Twitter)
* Jason Sofonia (ex-Twitter)
* Bryan Haggerty (ex-Twitter)
* Nathan Downs (ex-Twitter)
* Tom Wuttke (ex-Twitter)
Expand All @@ -255,7 +253,7 @@ The goal of this project is to simply provide emoji for everyone. We definitely

The rules for contributing are available in the `CONTRIBUTING.md` file.

Thank you to all of our [contributors](https://github.com/twitter/twemoji/graphs/contributors).
Thank you to all of our [contributors](https://github.com/jdecked/twemoji/graphs/contributors).

## License

Expand Down
Binary file modified assets/72x72/1f1f2-1f1fe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f301.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f3e5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f50f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f510.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f513.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f691.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f979.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/72x72/1f97a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/1f1f2-1f1fe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/1f301.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/1f3e5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/1f50f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/1f510.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/1f512.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading