Merge branch 'master' of gitlab.com:shockrah/clippable

This commit is contained in:
shockrah
2021-10-26 09:57:21 -07:00
4 changed files with 33 additions and 4 deletions

View File

@@ -15,7 +15,8 @@ class VideoMeta {
let link = document.createElement('a')
if(this.name) {
link.href = `/clip/${this.category}/${this.name}`
const file_name = this.name.slice(0, this.name.lastIndexOf('.'))
link.href = `/clip/${this.category}/${file_name}`
link.text = this.name
for(const chars of ['.', '-', '_', 'mp4', 'mkv', 'webm']) {
link.text = link.text.replace(chars, ' ')