1(function ($) { 2 // Wait for Owl Carousel to be loaded 3 $(document).ready(function () { 4 if ($.fn.owlCarousel && $.fn.owlCarousel.Constructor && $.fn.owlCarousel.Constructor.Plugins && $.fn.owlCarousel.Constructor.Plugins.Video) { 5 var Video = $.fn.owlCarousel.Constructor.Plugins.Video; 6 7 // Override thumbnail method 8 Video.prototype.thumbnail = function (b, c) { 9 var d, e, f, 10 g = "", 11 h = b.find("img"), 12 i = "src", 13 j = "", 14 k = this._core.settings, 15 l = function (a) { 16 e = '<div class="owl-video-play-icon"></div>'; 17 d = k.lazyLoad ? '<div class="owl-video-tn ' + j + '" ' + i + '="' + a + '"></div>' : $('<div class="owl-video-tn"></div>').css({ 18 opacity: 1, 19 backgroundImage: 'url(' + a + ')' 20 }); 21 b.after(d); 22 b.after(e); 23 }; 24 b.wrap('<div class="owl-video-wrapper"></div>'); 25 if (c.width && c.height) { 26 b.parent().css({ 27 width: c.width, 28 height: c.height 29 }); 30 } 31 // g was originally c.width ? style=... : "". We handle it via css() above. 32 33 return b.parent(), this._core.settings.lazyLoad && (i = "data-src", j = "owl-lazy"), h.length ? (l(h.attr(i)), h.remove(), !1) : void ("youtube" === c.type ? (f = "http://img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)) : "vimeo" === c.type && $.ajax({ 34 type: "GET", 35 url: "http://vimeo.com/api/v2/video/" + c.id + ".json", 36 jsonp: "callback", 37 dataType: "jsonp", 38 success: function (a) { 39 f = a[0].thumbnail_large; 40 l(f); 41 } 42 })); 43 }; 44 45 // Override play method 46 Video.prototype.play = function (b) { 47 this._core.trigger("play", null, "video"), this._playing && this.stop(); 48 var c, d, e = $(b.target || b.srcElement), 49 f = e.closest("." + this._core.settings.itemClass), 50 g = this._videos[f.attr("data-video")], 51 h = g.width || "100%", 52 i = g.height || this._core.$stage.height(); 53 "youtube" === g.type ? c = '<iframe width="' + h + '" height="' + i + '" src="http://www.youtube.com/embed/' + g.id + "?autoplay=1&v=" + g.id + '" frameborder="0" allowfullscreen></iframe>' : "vimeo" === g.type && (c = '<iframe src="http://player.vimeo.com/video/' + g.id + '?autoplay=1" width="' + h + '" height="' + i + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'), f.addClass("owl-video-playing"), this._playing = f; 54 55 // Fix: Use .css() instead of inline style string 56 d = $('<div class="owl-video-frame">' + c + '</div>').css({ 57 height: i, 58 width: h 59 }); 60 e.after(d); 61 }; 62 63 console.log('Owl Carousel Video Plugin overrides applied for CSP compliance.'); 64 } 65 }); 66})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.