Hides video description when it is empty (#1585)
Co-authored-by: Preston <freetubeapp@protonmail.com>
This commit is contained in:
parent
329a673cd8
commit
7add3e4b1c
|
@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||||
import FtCard from '../ft-card/ft-card.vue'
|
import FtCard from '../ft-card/ft-card.vue'
|
||||||
import FtTimestampCatcher from '../ft-timestamp-catcher/ft-timestamp-catcher.vue'
|
import FtTimestampCatcher from '../ft-timestamp-catcher/ft-timestamp-catcher.vue'
|
||||||
import autolinker from 'autolinker'
|
import autolinker from 'autolinker'
|
||||||
|
import $ from 'jquery'
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
name: 'WatchVideoDescription',
|
name: 'WatchVideoDescription',
|
||||||
|
@ -34,6 +35,10 @@ export default Vue.extend({
|
||||||
} else {
|
} else {
|
||||||
this.shownDescription = autolinker.link(this.description)
|
this.shownDescription = autolinker.link(this.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (/^\s*$/.test(this.shownDescription)) {
|
||||||
|
$('.videoDescription')[0].style.display = 'none'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTimestamp: function(timestamp) {
|
onTimestamp: function(timestamp) {
|
||||||
|
|
Loading…
Reference in New Issue