From 3b0249e58af59c91da11a9b0f16dd5f6233d300a Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 25 Oct 2021 23:35:51 -0700 Subject: [PATCH] - Removed file extensions from frontend --- ts/category.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/category.ts b/ts/category.ts index e9c7f52..b21ba00 100644 --- a/ts/category.ts +++ b/ts/category.ts @@ -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, ' ')