diff options
author | silverwind <me@silverwind.io> | 2020-05-21 04:00:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 22:00:43 -0400 |
commit | b02d2c37728491caaf8af3384b8d3b25411e4679 (patch) | |
tree | 09dead09d24417c288a16a24a52e772345b2554d /web_src/js/utils.js | |
parent | 3eb323901c6ec791294db492783e202558c2824f (diff) | |
download | gitea-b02d2c37728491caaf8af3384b8d3b25411e4679.tar.gz gitea-b02d2c37728491caaf8af3384b8d3b25411e4679.zip |
Move tributejs to npm/webpack (#11497)
* Move tributejs to npm/webpack
- Move vendored bundle to npm and webpack
- Rewrote initialization to single function
- Restyled it (made it a bit smaller)
- Fixed it for arc-green
* fix mention
* also include emoji on #content
* Update web_src/less/_tribute.less
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* rewrite to only use one instance of Tribute
* refactor
* fix copy/paste error
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src/js/utils.js')
-rw-r--r-- | web_src/js/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web_src/js/utils.js b/web_src/js/utils.js index b511c9981d..b16b05a1b7 100644 --- a/web_src/js/utils.js +++ b/web_src/js/utils.js @@ -23,3 +23,8 @@ export function isObject(obj) { export function isDarkTheme() { return document.documentElement.classList.contains('theme-arc-green'); } + +// removes duplicate elements in an array +export function uniq(arr) { + return Array.from(new Set(arr)); +} |