diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2021-10-21 15:37:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 15:37:43 +0800 |
commit | 2add8fe9beede4aa82c913fcb70c0cf5bb1c6185 (patch) | |
tree | be2555d0a8f0ae926d56eefd3a3b3e533985074a /web_src/js/features/emoji.js | |
parent | 5879ab83b5fab57a71aed4c8b3c4d9293b4a4398 (diff) | |
download | gitea-2add8fe9beede4aa82c913fcb70c0cf5bb1c6185.tar.gz gitea-2add8fe9beede4aa82c913fcb70c0cf5bb1c6185.zip |
Frontend refactor, PascalCase to camelCase, remove unused code (#17365)
* Frontend refactor, PascalCase to camelCase, remove unused code
* fix
Diffstat (limited to 'web_src/js/features/emoji.js')
-rw-r--r-- | web_src/js/features/emoji.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web_src/js/features/emoji.js b/web_src/js/features/emoji.js index 254a0b5c4d..304c564f3d 100644 --- a/web_src/js/features/emoji.js +++ b/web_src/js/features/emoji.js @@ -1,9 +1,9 @@ import emojis from '../../../assets/emoji.json'; -const {AssetUrlPrefix} = window.config; -const {CustomEmojis} = window.config; +const {assetUrlPrefix} = window.config; +const {customEmojis} = window.config; -const tempMap = {...CustomEmojis}; +const tempMap = {...customEmojis}; for (const {emoji, aliases} of emojis) { for (const alias of aliases || []) { tempMap[alias] = emoji; @@ -24,8 +24,8 @@ for (const key of emojiKeys) { // retrieve HTML for given emoji name export function emojiHTML(name) { let inner; - if (Object.prototype.hasOwnProperty.call(CustomEmojis, name)) { - inner = `<img alt=":${name}:" src="${AssetUrlPrefix}/img/emoji/${name}.png">`; + if (Object.prototype.hasOwnProperty.call(customEmojis, name)) { + inner = `<img alt=":${name}:" src="${assetUrlPrefix}/img/emoji/${name}.png">`; } else { inner = emojiString(name); } |