Use shorter youtu.be links instead of youtube.com for YouTube share links (#671)
This commit is contained in:
		
							parent
							
								
									b578be1059
								
							
						
					
					
						commit
						02231537f9
					
				| 
						 | 
					@ -93,6 +93,10 @@ export default Vue.extend({
 | 
				
			||||||
      return `https://www.youtube.com/watch?v=${this.id}`
 | 
					      return `https://www.youtube.com/watch?v=${this.id}`
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    youtubeShareUrl: function () {
 | 
				
			||||||
 | 
					      return `https://youtu.be/${this.id}`
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    youtubeEmbedUrl: function () {
 | 
					    youtubeEmbedUrl: function () {
 | 
				
			||||||
      return `https://www.youtube-nocookie.com/embed/${this.id}`
 | 
					      return `https://www.youtube-nocookie.com/embed/${this.id}`
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
| 
						 | 
					@ -168,7 +172,7 @@ export default Vue.extend({
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          break
 | 
					          break
 | 
				
			||||||
        case 'copyYoutube':
 | 
					        case 'copyYoutube':
 | 
				
			||||||
          navigator.clipboard.writeText(this.youtubeUrl)
 | 
					          navigator.clipboard.writeText(this.youtubeShareUrl)
 | 
				
			||||||
          this.showToast({
 | 
					          this.showToast({
 | 
				
			||||||
            message: this.$t('Share.YouTube URL copied to clipboard')
 | 
					            message: this.$t('Share.YouTube URL copied to clipboard')
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -50,6 +50,10 @@ export default Vue.extend({
 | 
				
			||||||
      return `https://www.youtube.com/watch?v=${this.id}`
 | 
					      return `https://www.youtube.com/watch?v=${this.id}`
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    youtubeShareURL() {
 | 
				
			||||||
 | 
					      return `https://youtu.be/${this.id}`
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    youtubeEmbedURL() {
 | 
					    youtubeEmbedURL() {
 | 
				
			||||||
      return `https://www.youtube-nocookie.com/embed/${this.id}`
 | 
					      return `https://www.youtube-nocookie.com/embed/${this.id}`
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -88,7 +92,7 @@ export default Vue.extend({
 | 
				
			||||||
      this.showToast({
 | 
					      this.showToast({
 | 
				
			||||||
        message: this.$t('Share.YouTube URL copied to clipboard')
 | 
					        message: this.$t('Share.YouTube URL copied to clipboard')
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      this.copy(this.getFinalUrl(this.youtubeURL))
 | 
					      this.copy(this.getFinalUrl(this.youtubeShareURL))
 | 
				
			||||||
      this.$refs.iconButton.focusOut()
 | 
					      this.$refs.iconButton.focusOut()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue