* 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')
|
let link = document.createElement('a')
|
||||||
if(this.name) {
|
if(this.name) {
|
||||||
link.href = `/category/${this.name}`
|
// remove the .jpg
|
||||||
link.text = this.name
|
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 {
|
} else {
|
||||||
link.href = '#'
|
link.href = '#'
|
||||||
link.text = 'this nigga eatin beans'
|
link.text = 'this nigga eatin beans'
|
||||||
|
Loading…
Reference in New Issue
Block a user