mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
feat: emoji合成
This commit is contained in:
parent
1432723de5
commit
f4a740a6a8
4 changed files with 69372 additions and 2 deletions
20
utils/emoj/index.js
Normal file
20
utils/emoj/index.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { Config } from '../config.js'
|
||||
|
||||
function googleRequestUrlEmojiFilename (combo) {
|
||||
return `${googleRequestUrlEmojiPart(
|
||||
combo.leftEmoji
|
||||
)}_${googleRequestUrlEmojiPart(combo.rightEmoji)}.png`
|
||||
}
|
||||
|
||||
function googleRequestUrlEmojiPart (emoji) {
|
||||
return emoji
|
||||
.split('-')
|
||||
.map((part) => `u${part.toLowerCase()}`)
|
||||
.join('-')
|
||||
}
|
||||
|
||||
export function googleRequestUrl (combo) {
|
||||
return `${Config.emojiBaseURL}/${combo.date}/${googleRequestUrlEmojiPart(
|
||||
combo.leftEmoji
|
||||
)}/${googleRequestUrlEmojiFilename(combo)}`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue