Sha256: 01efa4b9b85c441017f162df41121bbb3b0d2f700f893cafcbbeb42981142c73

Contents?: true

Size: 1.52 KB

Versions: 40

Compression:

Stored size: 1.52 KB

Contents

I"(function() {
  var PostShow,
    bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

  PostShow = (function() {
    function PostShow() {
      this.track = bind(this.track, this);
      this.is_video_embed_url = bind(this.is_video_embed_url, this);
      this.convert_videos_to_responsive = bind(this.convert_videos_to_responsive, this);
      this.convert_videos_to_responsive();
      this.track();
    }

    PostShow.prototype.convert_videos_to_responsive = function() {
      var self;
      self = this;
      return $(".post-body iframe").each(function() {
        var $iframe, $wrapper;
        $iframe = $(this);
        if (self.is_video_embed_url($iframe.attr('src'))) {
          $wrapper = $("<div class='embed-responsive embed-responsive-16by9 video-embed-wrap'></div>");
          $iframe.removeAttr("width").removeAttr("height").addClass("embed-responsive-item video-embed");
          return $iframe.wrap($wrapper);
        }
      });
    };

    PostShow.prototype.is_video_embed_url = function(url) {
      var provider;
      provider = url.match(/https?:\/\/(:?www.)?(\w*)/)[2];
      if (provider === 'youtube' || provider === 'vimeo' || provider === 'player' || provider === 'youtu.be') {
        return true;
      }
      return false;
    };

    PostShow.prototype.track = function() {
      return setTimeout(function() {
        return $.get($(".post").attr("data-tracking-uri"));
      }, 500);
    };

    return PostShow;

  })();

  window.PostShow = PostShow;

}).call(this);
:ET

Version data entries

40 entries across 36 versions & 1 rubygems

Version Path
virgo-0.3.17 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.16 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.15 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.14 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.13 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.12 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.12 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.11 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.10 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.9 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.8 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.7 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.6 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.4 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.3 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.2 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3.1 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.3 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.2.9 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache
virgo-0.2.8 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRRoSA1HxLSuaIqYpbyPRjINJ6DYufk4M-N_qnoHUwE.cache