<commit_before>var UiContainerPlugin = require('ui_container_plugin');
var JST = require('.././jst');
var Styler = require('./styler')

class PlaybackName extends UiContainerPlugin {

  get name() { return 'playbackname' }
  get template() { return JST.playbackname }
  
  get attributes() {
    return {
      'class': this.name,
      'data-playbackname': ''
    }
  }
  
  constructor(options) {
    super(options)
    this.render()
  }

  render() {
    var playback_name = this.container.playback.name
    this.$el.html(this.template({'name':playback_name}))
    this.container.$el.append(this.el)

    var style = Styler.getStyleFor(this.name)
    this.$el.append(style)

    return this;
  }

}

module.exports = window.PlaybackName = PlaybackName;<commit_msg>main: support wrapper playback plugin<commit_after>var UiContainerPlugin = require('ui_container_plugin');
var JST = require('.././jst');
var Styler = require('./styler')

class PlaybackName extends UiContainerPlugin {

  get name() { return 'playbackname' }
  get template() { return JST.playbackname }
  
  get attributes() {
    return {
      'class': this.name,
      'data-playbackname': ''
    }
  }
  
  constructor(options) {
    super(options)
    this.listenTo(this.container.playback, 'playback:settingsupdate', this.render)
    this.render()
  }

  render() {
    if (!!this.container.playback.playback) {
      var playback_name = this.container.playback.playback.name
    } else {
      var playback_name = this.container.playback.name
    }
    this.$el.html(this.template({'name':playback_name}))
    this.container.$el.append(this.el)

    var style = Styler.getStyleFor(this.name)
    this.$el.append(style)

    return this;
  }

}

module.exports = window.PlaybackName = PlaybackName;
{'fraction_non_alphanumeric': 0.1399548532731377, 'fraction_numerical': 0.0, 'mean_word_length': 3.41044776119403, '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': '7002927', 'n_tokens_mistral': 591, 'n_tokens_neox': 573, 'n_words': 102}