<commit_before>import videojs from 'video.js'
import { buildVideoLink, decorateVideoLink } from '@shared/core-utils'
import { PeerTubeLinkButtonOptions } from '../peertube-videojs-typings'

const Button = videojs.getComponent('Button')
class PeerTubeLinkButton extends Button {
  private shortUUID: string

  constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) {
    super(player, options as any)
  }

  createEl () {
    return this.buildElement()
  }

  updateHref () {
    this.el().setAttribute('href', this.buildLink())
  }

  handleClick () {
    this.player().pause()
  }

  private buildElement () {
    const el = videojs.dom.createEl('a', {
      href: this.buildLink(),
      innerHTML: 'PeerTube',
      title: this.player().localize('Video page (new window)'),<commit_msg>Correctly fix peertube button link<commit_after>import videojs from 'video.js'
import { buildVideoLink, decorateVideoLink } from '@shared/core-utils'
import { PeerTubeLinkButtonOptions } from '../peertube-videojs-typings'

const Button = videojs.getComponent('Button')
class PeerTubeLinkButton extends Button {
  private shortUUID: string

  constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) {
    super(player, options as any)

    this.shortUUID = options.shortUUID
  }

  createEl () {
    return this.buildElement()
  }

  updateHref () {
    this.el().setAttribute('href', this.buildLink())
  }

  handleClick () {
    this.player().pause()
  }

  private buildElement () {
    const el = videojs.dom.createEl('a', {
      href: this.buildLink(),
      innerHTML: 'PeerTube',
      title: this.player().localize('Video page (new window)'),
{'fraction_non_alphanumeric': 0.13074626865671643, 'fraction_numerical': 0.0, 'mean_word_length': 4.033033033033033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '16400', 'n_tokens_mistral': 513, 'n_tokens_neox': 498, 'n_words': 113}