Sha256: 7a22b5fd5177e3e29c576e43dd424dbbef11b85fb1da84b28040deebcce65828

Contents?: true

Size: 726 Bytes

Versions: 258

Compression:

Stored size: 726 Bytes

Contents

window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};

(function (Modules) {
  function Govspeak ($module) {
    this.$module = $module
  }

  Govspeak.prototype.init = function () {
    if (this.$module.className.indexOf('disable-youtube') === -1) {
      this.embedYoutube()
    }

    this.createBarcharts()
  }

  Govspeak.prototype.embedYoutube = function () {
    var enhancement = new window.GOVUK.GovspeakYoutubeLinkEnhancement(this.$module)
    enhancement.init()
  }

  Govspeak.prototype.createBarcharts = function () {
    var enhancement = new window.GOVUK.GovspeakBarchartEnhancement(this.$module)
    enhancement.init()
  }

  Modules.Govspeak = Govspeak
})(window.GOVUK.Modules)

Version data entries

258 entries across 258 versions & 1 rubygems

Version Path
govuk_publishing_components-44.4.2 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-44.4.1 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-44.4.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-44.3.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-44.2.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-44.1.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-44.0.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.5.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.4.1 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.4.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.3.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.2.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.1.1 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.1.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.0.2 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.0.1 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-43.0.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-42.1.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-42.0.0 app/assets/javascripts/govuk_publishing_components/components/govspeak.js
govuk_publishing_components-41.1.2 app/assets/javascripts/govuk_publishing_components/components/govspeak.js