PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
jetpack / _inc / build / theme-tools / responsive-videos / responsive-videos.min.js

responsive-videos.min.js in Jetpack – WP Security, Backup, Speed, & Growth 16.3-beta, at _inc/build/theme-tools/responsive-videos/responsive-videos.min.js

1 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{"use strict";var t={303(){}};const e={};(function i(n){const o=e[n];if(void 0!==o)return o.exports;const r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports})(303);let i;function n(){document.querySelectorAll(".jetpack-video-wrapper").forEach(function(t){t.querySelectorAll("embed, iframe, object").forEach(function(e){let i=0;const n=t.previousElementSibling;n&&"P"===n.nodeName&&"center"===getComputedStyle(n)["text-align"]&&(i="0 auto"),e.hasAttribute("data-ratio")||(e.setAttribute("data-ratio",(e.height||0)/(e.width||0)),e.setAttribute("data-width",e.width),e.setAttribute("data-height",e.height),e.style.display="block",e.style.margin=i);const o=e.getAttribute("data-height"),r=e.getAttribute("data-ratio"),a=e.parentElement.clientWidth;if(e.removeAttribute("height"),e.removeAttribute("width"),"Infinity"===r)return e.style.width="100%",void(e.style.height=o+"px");const d=e.getAttribute("data-width");parseInt(d,10)>a?(e.style.width=a+"px",e.style.height=a*parseFloat(r)+"px"):(e.style.width=d+"px",e.style.height=o+"px")})})}function o(){window.addEventListener("load",n),window.addEventListener("resize",function(){clearTimeout(i),i=setTimeout(n,500)}),window.addEventListener("is.post-load",n),setTimeout(n)}"loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o)})();