* Fixing clip links for individual clips
This commit is contained in:
parent
69dfa488d9
commit
574bcc0473
@ -24,8 +24,19 @@ class VideoMeta {
|
||||
|
||||
let link = document.createElement('a')
|
||||
if(this.name) {
|
||||
link.href = `/category/${this.name}`
|
||||
link.text = this.name
|
||||
// remove the .jpg
|
||||
let fname = this.name.substr(0, this.name.length - 4)
|
||||
console.log(fname)
|
||||
const parts = fname.split('.')
|
||||
const extension = parts[parts.length -1]
|
||||
|
||||
if(extension == '.webm') {
|
||||
fname = fname.substr(0, fname.length - 5)
|
||||
} else {
|
||||
fname = fname.substr(0, fname.length - 4)
|
||||
}
|
||||
link.href = `/clip/${fname}`
|
||||
link.text = fname.replace('.', ' ').replace('-', ' ')
|
||||
} else {
|
||||
link.href = '#'
|
||||
link.text = 'this nigga eatin beans'
|
||||
|
Loading…
Reference in New Issue
Block a user