summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js')
-rw-r--r--plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js
new file mode 100644
index 00000000..ff419935
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js
@@ -0,0 +1 @@
+!function(t){function a(){t(".jetpack-video-wrapper").find("embed, iframe, object").each(function(){var a,e,i,r,h,d,o;a=t(this),d=0,"center"===a.parents(".jetpack-video-wrapper").prev("p").css("text-align")&&(d="0 auto"),a.attr("data-ratio")||a.attr("data-ratio",this.height/this.width).attr("data-width",this.width).attr("data-height",this.height).css({display:"block",margin:d}),e=a.attr("data-width"),i=a.attr("data-height"),r=a.attr("data-ratio"),h=a.parent(),o=h.width(),"Infinity"===r&&(e="100%"),a.removeAttr("height").removeAttr("width"),e>o?a.width(o).height(o*r):a.width(e).height(i)})}var e;t(document).ready(function(){t(window).on("load.jetpack",a).on("resize.jetpack",function(){clearTimeout(e),e=setTimeout(a,500)}).on("post-load.jetpack",a).resize()})}(jQuery); \ No newline at end of file