- Removed file extensions from frontend

This commit is contained in:
shockrah 2021-10-25 23:35:51 -07:00
parent 6bb44e5d05
commit 3b0249e58a

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, ' ')