1
0
mirror of https://github.com/Earu/EasyChat.git synced 2025-03-04 03:13:20 -05:00

Twemoji: Replace Deprecated MaxCDN with JDecked Twemoji (#126)

* Replace MaxCDN urls with CDNJS

https://github.com/twitter/twemoji/issues/580 states the usual cdn (MaxCDN) is no longer working, this replaces it to use cdnjs instead on the latest version (14.0.2).

* use jdecked/twemoji version instead of official twemoji

* Switch to jdecked.github.io URL instead of jsdelivr

Co-authored-by: Cynthia Foxwell <gamers@riseup.net>

---------

Co-authored-by: Cynthia Foxwell <gamers@riseup.net>
This commit is contained in:
Ayase Minori 2024-09-05 23:32:22 +08:00 committed by GitHub
parent fef77d6e84
commit 184be4484d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,7 +174,7 @@ end, function(err)
end)
local function get_twemoji_url(name)
return ("https://twemoji.maxcdn.com/v/latest/72x72/%s.png"):format(discord_lookup[name])
return ("https://jdecked.github.io/twemoji/v/latest/72x72/%s.png"):format(discord_lookup[name])
end
local function get_twemoji_url_codepoints(tbl)
@ -183,7 +183,7 @@ local function get_twemoji_url_codepoints(tbl)
table.insert(formatted, ("%x"):format(num))
end
return ("https://twemoji.maxcdn.com/v/latest/72x72/%s.png"):format(table.concat(formatted, "-"))
return ("https://jdecked.github.io/twemoji/v/latest/72x72/%s.png"):format(table.concat(formatted, "-"))
end
local function to_hex(str)