mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-13 04:59:33 +01:00
Remove unneeded code from watch-video-info
This commit is contained in:
parent
721e7eda2a
commit
46fcd06621
@ -71,19 +71,6 @@ export default Vue.extend({
|
||||
'dash',
|
||||
'legacy',
|
||||
'audio'
|
||||
],
|
||||
shareLabel: 'SHARE VIDEO',
|
||||
shareNames: [
|
||||
'COPY INVIDIOUS LINK',
|
||||
'OPEN INVIDIOUS LINK',
|
||||
'COPY YOUTUBE LINK',
|
||||
'OPEN YOUTUBE LINK'
|
||||
],
|
||||
shareValues: [
|
||||
'copyInvidious',
|
||||
'openInvidious',
|
||||
'copyYoutube',
|
||||
'openYoutube'
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -96,18 +83,6 @@ export default Vue.extend({
|
||||
return this.$store.getters.getUsingElectron
|
||||
},
|
||||
|
||||
invidiousUrl: function () {
|
||||
return `${this.invidiousInstance}/watch?v=${this.id}`
|
||||
},
|
||||
|
||||
youtubeUrl: function () {
|
||||
return `https://www.youtube.com/watch?v=${this.id}`
|
||||
},
|
||||
|
||||
youtubeEmbedUrl: function () {
|
||||
return `https://www.youtube-nocookie.com/embed/${this.id}`
|
||||
},
|
||||
|
||||
totalLikeCount: function () {
|
||||
return this.likeCount + this.dislikeCount
|
||||
},
|
||||
@ -145,40 +120,6 @@ export default Vue.extend({
|
||||
this.$parent.enableAudioFormat()
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
handleShare: function (method) {
|
||||
console.log('Handling share')
|
||||
|
||||
switch (method) {
|
||||
case 'copyYoutube':
|
||||
navigator.clipboard.writeText(this.youtubeUrl)
|
||||
break
|
||||
case 'openYoutube':
|
||||
if (this.usingElectron) {
|
||||
const shell = require('electron').shell
|
||||
shell.openExternal(this.youtubeUrl)
|
||||
}
|
||||
break
|
||||
case 'copyYoutubeEmbed':
|
||||
navigator.clipboard.writeText(this.youtubeEmbedUrl)
|
||||
break
|
||||
case 'openYoutubeEmbed':
|
||||
if (this.usingElectron) {
|
||||
const shell = require('electron').shell
|
||||
shell.openExternal(this.youtubeEmbedUrl)
|
||||
}
|
||||
break
|
||||
case 'copyInvidious':
|
||||
navigator.clipboard.writeText(this.invidiousUrl)
|
||||
break
|
||||
case 'openInvidious':
|
||||
if (this.usingElectron) {
|
||||
const shell = require('electron').shell
|
||||
shell.openExternal(this.invidiousUrl)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user