Jetpack by WordPress.com - Version 8.8.2

Version Description

  • Release date: August 17, 2020

Bug fixes

  • Infinite Scroll: avoid loading issues with some themes using Infinite Scroll.
Download this release

Release Info

Developer jeherve
Plugin Icon 128x128 Jetpack by WordPress.com
Version 8.8.2
Comparing to
See all releases

Code changes from version 8.8.1 to 8.8.2

_inc/build/infinite-scroll/infinity.min.js CHANGED
@@ -1,3 +1,3 @@
1
  /* Do not modify this file directly. It is compiled from other files. */
2
  /* globals infiniteScroll, _wpmejsSettings, ga, _gaq, WPCOM_sharing_counts, MediaElementPlayer */
3
- !function(){var Scroller,ajaxurl,stats,type,text,totop,loading_text,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE){var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/);IEVersion=parseInt(IEVersion[1])}function fullscreenState(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?1:0}"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=document.body,this.window=window,this.element=document.getElementById(e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.handle=document.createElement("div"),this.handle.setAttribute("id","infinite-handle"),this.handle.innerHTML="<span><button>"+text.replace("\\","")+"</button></span>",this.footer={el:document.getElementById("infinite-footer"),wrap:e.footer},this.checkViewportOnLoadBound=t.checkViewportOnLoad.bind(this),this.wpMediaelement=null,"scroll"==type?(this.window.addEventListener("scroll",function(){t.throttle=!0}),t.gotop(),setInterval(function(){t.throttle&&(t.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())},250),t.ensureFilledViewport(),this.body.addEventListener("is.post-load",t.checkViewportOnLoadBound)):"click"==type&&(this.click_handle&&this.element.appendChild(this.handle),this.handle.addEventListener("click",function(){t.click_handle&&t.handle.parentNode.removeChild(t.handle),t.refresh()})),this.body.addEventListener("is.post-load",t.initializeMejs)},Scroller.prototype.getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Scroller.prototype.extend=function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var i in arguments[t])arguments[t].hasOwnProperty(i)&&(e[i]=arguments[t][i]);return e},Scroller.prototype.check=function(){return this.measure(this.element,[this.wrapperClass]).bottom<2*this.window.innerHeight},Scroller.prototype.render=function(e){var t=Array.prototype.slice.call(e.fragment.childNodes);for(this.body.classList.add("infinity-success");t.length>0;){var i=t.shift();this.element.appendChild(i)}this.trigger(this.body,"is.post-load",{jqueryEventName:"post-load",data:e}),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,query_before:window.infiniteScroll.settings.query_before,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.animate=function(e,t){var i=performance.now();requestAnimationFrame(function n(o){var r=Math.min(1,(o-i)/t);e(r),r<1&&requestAnimationFrame(n)})},Scroller.prototype.gotop=function(){var e=document.getElementById("infinity-blog-title"),t=this;e&&(e.setAttribute("title",totop),e.addEventListener("click",function(e){var i=t.window.pageYOffset;e.preventDefault(),t.animate(function(e){var t=i-i*e;document.documentElement.scrollTop=document.body.scrollTop=t},200)}))},Scroller.prototype.thefooter=function(){var e,t,i,n,o=this;if(this.footer&&this.footer.el){if("string"==typeof this.footer.wrap){try{t=(t=document.getElementById(this.footer.wrap).getBoundingClientRect()).width}catch(e){t=0}t>479&&(e=this.footer.el.querySelector(".container"))&&(e.style.width=t+"px")}i=parseInt(o.footer.el.style.bottom||-50,10),n=this.window.pageYOffset>=350?0:-50,i!==n&&o.animate(function(e){var t=i+(n-i)*e;o.footer.el.style.bottom=t+"px",1===e&&(i=n)},200)}},Scroller.prototype.urlEncodeJSON=function(e,t){var i,n,o=[];for(var r in e)i=encodeURIComponent(r),n=t?t+"["+i+"]":i,"object"==typeof e[r]?!Array.isArray(e[r])||e[r].length>0?o.push(this.urlEncodeJSON(e[r],n)):o.push(n+"[]="):o.push(n+"="+encodeURIComponent(e[r]));return o.join("&")},Scroller.prototype.refresh=function(){var self=this,query,xhr,loader,customized;if(!this.disabled&&this.ready&&this.check())return this.ready=!1,this.click_handle&&(loader||(document.getElementById("infinite-aria").textContent=loading_text,loader=document.createElement("div"),loader.classList.add("infinite-loader"),loader.setAttribute("role","progress"),loader.innerHTML='<div class="spinner"><div class="spinner-inner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>'),this.element.appendChild(loader)),query=self.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),xhr=new XMLHttpRequest,xhr.open("POST",infiniteScroll.settings.ajaxurl,!0),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),xhr.send(self.urlEncodeJSON(query)),xhr.onerror=function(){self.click_handle&&loader.parentNode.removeChild(loader),self.ready=!0},xhr.onload=function(){var response=JSON.parse(xhr.responseText),httpCheck=xhr.status>=200&&xhr.status<300,responseCheck=void 0!==response.html;if(response&&httpCheck&&responseCheck&&(self.click_handle&&loader.parentNode.removeChild(loader),response.scripts&&Array.isArray(response.scripts)&&response.scripts.forEach(function(e){var t=e.footer?"body":"head";window.infiniteScroll.settings.scripts.push(e.handle),e.extra_data&&self.appendInlineScript(e.extra_data,t),e.before_handle&&self.appendInlineScript(e.before_handle,t);var i=document.createElement("script");i.type="text/javascript",i.src=e.src,i.id=e.handle,i.async=!1,e.after_handle&&(i.onload=function(){self.appendInlineScript(e.after_handle,t)}),"wp-mediaelement"===e.handle&&self.body.removeEventListener("is.post-load",self.initializeMejs),"wp-mediaelement"===e.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=i,self.wpMediaelement.element=t,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(t)[0].appendChild(i)}),response.styles&&Array.isArray(response.styles)&&response.styles.forEach(function(item){window.infiniteScroll.settings.styles.push(item.handle);var style=document.createElement("link");style.rel="stylesheet",style.href=item.src,style.id=item.handle+"-css",!item.conditional||isIE&&eval(item.conditional.replace(/%ver/g,IEVersion))||(style=!1),style&&document.getElementsByTagName("head")[0].appendChild(style)}),response.fragment=document.createElement("div"),response.fragment.innerHTML=response.html,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=self.extend(WPCOM_sharing_counts,response.postflair)),self.render.call(self,response),"click"==type?(document.querySelector("#infinite-view-"+(self.page+self.offset-1)+" a:first-of-type").focus({preventScroll:!0}),response.lastbatch?self.click_handle?(self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")):self.trigger(this.body,"infinite-scroll-posts-end"):self.click_handle?self.element.appendChild(self.handle):self.trigger(this.body,"infinite-scroll-posts-more")):response.lastbatch&&(self.disabled=!0,self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics)){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}},xhr},Scroller.prototype.appendInlineScript=function(e,t){var i=document.createElement("script"),n=document.createTextNode("//<![CDATA[ \n"+e+"\n//]]>");i.type="text/javascript",i.appendChild(n),document.getElementsByTagName(t)[0].appendChild(i)},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs.bind(this),250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.addEventListener("is.post-load",this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e){if(e.detail&&e.detail.html&&(-1!==e.detail.html.indexOf("wp-audio-shortcode")||-1!==e.detail.html.indexOf("wp-video-shortcode"))&&"undefined"!=typeof mejs){var t,i={};"undefined"!=typeof _wpmejsSettings&&(i.pluginPath=_wpmejsSettings.pluginPath),i.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},t=document.querySelectorAll(".wp-audio-shortcode, .wp-video-shortcode"),t=(t=Array.prototype.slice.call(t)).filter(function(e){for(;e.parentNode;){if(e.classList.contains("mejs-container"))return!1;e=e.parentNode}return!0});for(var n=0;n<t.length;n++)new MediaElementPlayer(t[n],i)}},Scroller.prototype.measure=function(e,t){t=t||[];for(var i,n,o,r=Array.prototype.slice.call(e.children),s=Number.MAX_VALUE,l=0;r.length>0;){for(i=r.shift(),o=0;o<t.length;o++)if(i.classList.contains(t[o])){r=r.concat(Array.prototype.slice.call(i.children));break}n=i.getBoundingClientRect(),s=Math.min(s,n.top),l=Math.max(l,n.bottom)}var a=Math.round(window.innerHeight/2),d=s<=a&&l>=a;return{top:s,bottom:l,height:l-s,factor:(Math.min(l,a)-Math.max(s,0))/a,isActive:d}},Scroller.prototype.ensureFilledViewport=function(){var e=this.window.innerHeight,t=this.measure(this.element,[this.wrapperClass]);this.body.removeEventListener("is.post-load",this.checkViewportOnLoadBound),t.bottom<e&&(this.ready=!0,this.refresh())},Scroller.prototype.checkViewportOnLoad=function(){this.ensureFilledViewport()};var previousFullScrenState=fullscreenState();Scroller.prototype.determineURL=function(){var e,t=-1,i=fullscreenState(),n=0;if(previousFullScrenState^i)previousFullScrenState=i;else{previousFullScrenState=i,e=document.querySelectorAll("."+this.wrapperClass);for(var o=0;o<e.length;o++){var r=this.measure(e[o]);if(r.isActive){t=parseInt(e[o].dataset.pageNum,10);break}r.factor>n&&(t=parseInt(e[o].dataset.pageNum,10),n=r.factor)}this.updateURL(t)}},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this.origURL;-1!==e&&(t=window.location.protocol+"//"+this.history.host+this.history.path.replace(/%d/,e)+this.history.parameters),window.location.href!=t&&history.pushState(null,null,t)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},Scroller.prototype.trigger=function(e,t,i){var n;(i=i||{}).jqueryEventName&&"undefined"!=typeof jQuery&&jQuery(e).trigger(i.jqueryEventName,i.data||null);try{n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i.data||null})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,i.data||null)}e.dispatchEvent(n)};var jetpackInfinityModule=function(){var e=infiniteScroll.settings.body_class.split(" ");if("object"==typeof infiniteScroll&&(e.forEach(function(e){e&&document.body.classList.add(e)}),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,loading_text=infiniteScroll.settings.loading_text,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type)){var t=null;window.addEventListener("scroll",function(){t||(t=setTimeout(function(){infiniteScroll.scroller.determineURL(),t=null},250))})}};"interactive"===document.readyState||"complete"===document.readyState?jetpackInfinityModule():document.addEventListener("DOMContentLoaded",jetpackInfinityModule)}();
1
  /* Do not modify this file directly. It is compiled from other files. */
2
  /* globals infiniteScroll, _wpmejsSettings, ga, _gaq, WPCOM_sharing_counts, MediaElementPlayer */
3
+ !function(){var Scroller,ajaxurl,stats,type,text,totop,loading_text,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE){var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/);IEVersion=parseInt(IEVersion[1])}function fullscreenState(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?1:0}"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=document.body,this.window=window,this.element=document.getElementById(e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.handle=document.createElement("div"),this.handle.setAttribute("id","infinite-handle"),this.handle.innerHTML="<span><button>"+text.replace("\\","")+"</button></span>",this.footer={el:document.getElementById("infinite-footer"),wrap:e.footer},this.checkViewportOnLoadBound=t.checkViewportOnLoad.bind(this),this.wpMediaelement=null,"scroll"==type?(this.window.addEventListener("scroll",function(){t.throttle=!0}),t.gotop(),setInterval(function(){t.throttle&&(t.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())},250),t.ensureFilledViewport(),this.body.addEventListener("is.post-load",t.checkViewportOnLoadBound)):"click"==type&&(this.click_handle&&this.element.appendChild(this.handle),this.handle.addEventListener("click",function(){t.click_handle&&t.handle.parentNode.removeChild(t.handle),t.refresh()})),this.body.addEventListener("is.post-load",t.initializeMejs)},Scroller.prototype.getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Scroller.prototype.extend=function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var i in arguments[t])arguments[t].hasOwnProperty(i)&&(e[i]=arguments[t][i]);return e},Scroller.prototype.check=function(){return this.measure(this.element,[this.wrapperClass]).bottom<2*this.window.innerHeight},Scroller.prototype.render=function(e){var t=Array.prototype.slice.call(e.fragment.childNodes);for(this.body.classList.add("infinity-success");t.length>0;){var i=t.shift();this.element.appendChild(i)}this.trigger(this.body,"is.post-load",{jqueryEventName:"post-load",data:e}),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,query_before:window.infiniteScroll.settings.query_before,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.animate=function(e,t){var i=performance.now();requestAnimationFrame(function n(o){var r=Math.min(1,(o-i)/t);e(r),r<1&&requestAnimationFrame(n)})},Scroller.prototype.gotop=function(){var e=document.getElementById("infinity-blog-title"),t=this;e&&(e.setAttribute("title",totop),e.addEventListener("click",function(e){var i=t.window.pageYOffset;e.preventDefault(),t.animate(function(e){var t=i-i*e;document.documentElement.scrollTop=document.body.scrollTop=t},200)}))},Scroller.prototype.thefooter=function(){var e,t,i,n,o=this;if(this.footer&&this.footer.el){if("string"==typeof this.footer.wrap){try{t=(t=document.getElementById(this.footer.wrap).getBoundingClientRect()).width}catch(e){t=0}t>479&&(e=this.footer.el.querySelector(".container"))&&(e.style.width=t+"px")}i=parseInt(o.footer.el.style.bottom||-50,10),n=this.window.pageYOffset>=350?0:-50,i!==n&&o.animate(function(e){var t=i+(n-i)*e;o.footer.el.style.bottom=t+"px",1===e&&(i=n)},200)}},Scroller.prototype.urlEncodeJSON=function(e,t){var i,n,o=[];for(var r in e)i=encodeURIComponent(r),n=t?t+"["+i+"]":i,"object"==typeof e[r]?!Array.isArray(e[r])||e[r].length>0?o.push(this.urlEncodeJSON(e[r],n)):o.push(n+"[]="):o.push(n+"="+encodeURIComponent(e[r]));return o.join("&")},Scroller.prototype.refresh=function(){var self=this,query,xhr,loader,customized;if(!this.disabled&&this.ready&&this.check())return this.ready=!1,this.click_handle&&(loader||(document.getElementById("infinite-aria").textContent=loading_text,loader=document.createElement("div"),loader.classList.add("infinite-loader"),loader.setAttribute("role","progress"),loader.innerHTML='<div class="spinner"><div class="spinner-inner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>'),this.element.appendChild(loader)),query=self.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),xhr=new XMLHttpRequest,xhr.open("POST",infiniteScroll.settings.ajaxurl,!0),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),xhr.send(self.urlEncodeJSON(query)),xhr.onerror=function(){self.click_handle&&loader.parentNode.removeChild(loader),self.ready=!0},xhr.onload=function(){var response=JSON.parse(xhr.responseText),httpCheck=xhr.status>=200&&xhr.status<300,responseCheck=void 0!==response.html;if(response&&httpCheck&&responseCheck&&(self.click_handle&&loader.parentNode.removeChild(loader),response.scripts&&Array.isArray(response.scripts)&&response.scripts.forEach(function(e){var t=e.footer?"body":"head";window.infiniteScroll.settings.scripts.push(e.handle),e.extra_data&&self.appendInlineScript(e.extra_data,t),e.before_handle&&self.appendInlineScript(e.before_handle,t);var i=document.createElement("script");i.type="text/javascript",i.src=e.src,i.id=e.handle,i.async=!1,e.after_handle&&(i.onload=function(){self.appendInlineScript(e.after_handle,t)}),"wp-mediaelement"===e.handle&&self.body.removeEventListener("is.post-load",self.initializeMejs),"wp-mediaelement"===e.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=i,self.wpMediaelement.element=t,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(t)[0].appendChild(i)}),response.styles&&Array.isArray(response.styles)&&response.styles.forEach(function(item){window.infiniteScroll.settings.styles.push(item.handle);var style=document.createElement("link");style.rel="stylesheet",style.href=item.src,style.id=item.handle+"-css",!item.conditional||isIE&&eval(item.conditional.replace(/%ver/g,IEVersion))||(style=!1),style&&document.getElementsByTagName("head")[0].appendChild(style)}),response.fragment=document.createElement("div"),response.fragment.innerHTML=response.html,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=self.extend(WPCOM_sharing_counts,response.postflair)),self.render.call(self,response),"click"==type?(infiniteScroll.settings.wrapper&&document.querySelector("#infinite-view-"+(self.page+self.offset-1)+" a:first-of-type").focus({preventScroll:!0}),response.lastbatch?self.click_handle?(self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")):self.trigger(this.body,"infinite-scroll-posts-end"):self.click_handle?self.element.appendChild(self.handle):self.trigger(this.body,"infinite-scroll-posts-more")):response.lastbatch&&(self.disabled=!0,self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics)){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}},xhr},Scroller.prototype.appendInlineScript=function(e,t){var i=document.createElement("script"),n=document.createTextNode("//<![CDATA[ \n"+e+"\n//]]>");i.type="text/javascript",i.appendChild(n),document.getElementsByTagName(t)[0].appendChild(i)},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs.bind(this),250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.addEventListener("is.post-load",this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e){if(e.detail&&e.detail.html&&(-1!==e.detail.html.indexOf("wp-audio-shortcode")||-1!==e.detail.html.indexOf("wp-video-shortcode"))&&"undefined"!=typeof mejs){var t,i={};"undefined"!=typeof _wpmejsSettings&&(i.pluginPath=_wpmejsSettings.pluginPath),i.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},t=document.querySelectorAll(".wp-audio-shortcode, .wp-video-shortcode"),t=(t=Array.prototype.slice.call(t)).filter(function(e){for(;e.parentNode;){if(e.classList.contains("mejs-container"))return!1;e=e.parentNode}return!0});for(var n=0;n<t.length;n++)new MediaElementPlayer(t[n],i)}},Scroller.prototype.measure=function(e,t){t=t||[];for(var i,n,o,r=Array.prototype.slice.call(e.children),s=Number.MAX_VALUE,l=0;r.length>0;){for(i=r.shift(),o=0;o<t.length;o++)if(i.classList.contains(t[o])){r=r.concat(Array.prototype.slice.call(i.children));break}n=i.getBoundingClientRect(),s=Math.min(s,n.top),l=Math.max(l,n.bottom)}var a=Math.round(window.innerHeight/2),d=s<=a&&l>=a;return{top:s,bottom:l,height:l-s,factor:(Math.min(l,a)-Math.max(s,0))/a,isActive:d}},Scroller.prototype.ensureFilledViewport=function(){var e=this.window.innerHeight,t=this.measure(this.element,[this.wrapperClass]);this.body.removeEventListener("is.post-load",this.checkViewportOnLoadBound),t.bottom<e&&(this.ready=!0,this.refresh())},Scroller.prototype.checkViewportOnLoad=function(){this.ensureFilledViewport()};var previousFullScrenState=fullscreenState();Scroller.prototype.determineURL=function(){var e,t=-1,i=fullscreenState(),n=0;if(previousFullScrenState^i)previousFullScrenState=i;else{previousFullScrenState=i,e=document.querySelectorAll("."+this.wrapperClass);for(var o=0;o<e.length;o++){var r=this.measure(e[o]);if(r.isActive){t=parseInt(e[o].dataset.pageNum,10);break}r.factor>n&&(t=parseInt(e[o].dataset.pageNum,10),n=r.factor)}this.updateURL(t)}},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this.origURL;-1!==e&&(t=window.location.protocol+"//"+this.history.host+this.history.path.replace(/%d/,e)+this.history.parameters),window.location.href!=t&&history.pushState(null,null,t)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},Scroller.prototype.trigger=function(e,t,i){var n;(i=i||{}).jqueryEventName&&"undefined"!=typeof jQuery&&jQuery(e).trigger(i.jqueryEventName,i.data||null);try{n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i.data||null})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,i.data||null)}e.dispatchEvent(n)};var jetpackInfinityModule=function(){var e=infiniteScroll.settings.body_class.split(" ");if("object"==typeof infiniteScroll&&(e.forEach(function(e){e&&document.body.classList.add(e)}),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,loading_text=infiniteScroll.settings.loading_text,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type)){var t=null;window.addEventListener("scroll",function(){t||(t=setTimeout(function(){infiniteScroll.scroller.determineURL(),t=null},250))})}};"interactive"===document.readyState||"complete"===document.readyState?jetpackInfinityModule():document.addEventListener("DOMContentLoaded",jetpackInfinityModule)}();
changelog.txt CHANGED
@@ -2,6 +2,14 @@
2
 
3
  **This is a list detailing changes for all Jetpack releases.**
4
 
 
 
 
 
 
 
 
 
5
  = 8.8.1 =
6
 
7
  * Release date: August 10, 2020
2
 
3
  **This is a list detailing changes for all Jetpack releases.**
4
 
5
+ = 8.8.2 =
6
+
7
+ * Release date: August 17, 2020
8
+
9
+ **Bug fixes**
10
+
11
+ * Infinite Scroll: avoid loading issues with some themes using Infinite Scroll.
12
+
13
  = 8.8.1 =
14
 
15
  * Release date: August 10, 2020
jetpack.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://jetpack.com
5
  * Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users.
6
  * Author: Automattic
7
- * Version: 8.8.1
8
  * Author URI: https://jetpack.com
9
  * License: GPL2+
10
  * Text Domain: jetpack
@@ -16,7 +16,7 @@
16
 
17
  define( 'JETPACK__MINIMUM_WP_VERSION', '5.4' );
18
  define( 'JETPACK__MINIMUM_PHP_VERSION', '5.6' );
19
- define( 'JETPACK__VERSION', '8.8.1' );
20
  define( 'JETPACK_MASTER_USER', true );
21
  define( 'JETPACK__API_VERSION', 1 );
22
  define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
4
  * Plugin URI: https://jetpack.com
5
  * Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users.
6
  * Author: Automattic
7
+ * Version: 8.8.2
8
  * Author URI: https://jetpack.com
9
  * License: GPL2+
10
  * Text Domain: jetpack
16
 
17
  define( 'JETPACK__MINIMUM_WP_VERSION', '5.4' );
18
  define( 'JETPACK__MINIMUM_PHP_VERSION', '5.6' );
19
+ define( 'JETPACK__VERSION', '8.8.2' );
20
  define( 'JETPACK_MASTER_USER', true );
21
  define( 'JETPACK__API_VERSION', 1 );
22
  define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
modules/infinite-scroll/infinity.js CHANGED
@@ -486,12 +486,16 @@
486
 
487
  // If 'click' type and there are still posts to fetch, add back the handle
488
  if ( type == 'click' ) {
489
- // add focus to new posts, only in button mode as we know where page focus currently is
490
- document
491
- .querySelector( '#infinite-view-' + ( self.page + self.offset - 1 ) + ' a:first-of-type' )
492
- .focus( {
493
- preventScroll: true,
494
- } );
 
 
 
 
495
 
496
  if ( response.lastbatch ) {
497
  if ( self.click_handle ) {
486
 
487
  // If 'click' type and there are still posts to fetch, add back the handle
488
  if ( type == 'click' ) {
489
+ // add focus to new posts, only in button mode as we know where page focus currently is and only if we have a wrapper
490
+ if ( infiniteScroll.settings.wrapper ) {
491
+ document
492
+ .querySelector(
493
+ '#infinite-view-' + ( self.page + self.offset - 1 ) + ' a:first-of-type'
494
+ )
495
+ .focus( {
496
+ preventScroll: true,
497
+ } );
498
+ }
499
 
500
  if ( response.lastbatch ) {
501
  if ( self.click_handle ) {
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Jetpack by WordPress.com ===
2
  Contributors: automattic, adamkheckler, aduth, akirk, allendav, alternatekev, andy, annezazu, apeatling, azaozz, batmoo, barry, beaulebens, blobaugh, brbrr, cainm, cena, cfinke, chaselivingston, chellycat, clickysteve, csonnek, danielbachhuber, davoraltman, daniloercoli, delawski, designsimply, dllh, drawmyface, dsmart, dzver, ebinnion, egregor, eliorivero, enej, eoigal, erania-pinnera, ethitter, gcorne, georgestephanis, gibrown, goldsounds, hew, hugobaeta, hypertextranch, iammattthomas, iandunn, jblz, jasmussen, jeffgolenski, jeherve, jenhooks, jenia, jessefriedman, jgs, jkudish, jmdodd, joanrho, johnjamesjacoby, jshreve, kbrownkd, keoshi, koke, kraftbj, lancewillett, lschuyler, macmanx, martinremy, matt, matveb, mattwiebe, maverick3x6, mcsf, mdawaffe, MichaelArestad, migueluy, mikeyarce, mkaz, nancythanki, nickmomrik, obenland, oskosk, pento, professor44, rachelsquirrel, rdcoll, ryancowles, richardmuscat, richardmtl, roccotripaldi, samhotchkiss, scarstocea, scottsweb, sdquirk, simison, stephdau, tmoorewp, tyxla, Viper007Bond, westi, yoavf, zinigor
3
  Tags: Jetpack, WordPress.com, backup, security, related posts, CDN, speed, anti-spam, social sharing, SEO, video, stats
4
- Stable tag: 8.8.1
5
  Requires at least: 5.4
6
  Requires PHP: 5.6
7
  Tested up to: 5.5
@@ -96,6 +96,14 @@ There are opportunities for developers at all levels to contribute. [Learn more
96
 
97
  == Changelog ==
98
 
 
 
 
 
 
 
 
 
99
  = 8.8.1 =
100
 
101
  * Release date: August 10, 2020
1
  === Jetpack by WordPress.com ===
2
  Contributors: automattic, adamkheckler, aduth, akirk, allendav, alternatekev, andy, annezazu, apeatling, azaozz, batmoo, barry, beaulebens, blobaugh, brbrr, cainm, cena, cfinke, chaselivingston, chellycat, clickysteve, csonnek, danielbachhuber, davoraltman, daniloercoli, delawski, designsimply, dllh, drawmyface, dsmart, dzver, ebinnion, egregor, eliorivero, enej, eoigal, erania-pinnera, ethitter, gcorne, georgestephanis, gibrown, goldsounds, hew, hugobaeta, hypertextranch, iammattthomas, iandunn, jblz, jasmussen, jeffgolenski, jeherve, jenhooks, jenia, jessefriedman, jgs, jkudish, jmdodd, joanrho, johnjamesjacoby, jshreve, kbrownkd, keoshi, koke, kraftbj, lancewillett, lschuyler, macmanx, martinremy, matt, matveb, mattwiebe, maverick3x6, mcsf, mdawaffe, MichaelArestad, migueluy, mikeyarce, mkaz, nancythanki, nickmomrik, obenland, oskosk, pento, professor44, rachelsquirrel, rdcoll, ryancowles, richardmuscat, richardmtl, roccotripaldi, samhotchkiss, scarstocea, scottsweb, sdquirk, simison, stephdau, tmoorewp, tyxla, Viper007Bond, westi, yoavf, zinigor
3
  Tags: Jetpack, WordPress.com, backup, security, related posts, CDN, speed, anti-spam, social sharing, SEO, video, stats
4
+ Stable tag: 8.8.2
5
  Requires at least: 5.4
6
  Requires PHP: 5.6
7
  Tested up to: 5.5
96
 
97
  == Changelog ==
98
 
99
+ = 8.8.2 =
100
+
101
+ * Release date: August 17, 2020
102
+
103
+ **Bug fixes**
104
+
105
+ * Infinite Scroll: avoid loading issues with some themes using Infinite Scroll.
106
+
107
  = 8.8.1 =
108
 
109
  * Release date: August 10, 2020
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa::getLoader();
vendor/autoload_functions.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34;
9
 
10
  // phpcs:ignore
11
 
vendor/autoload_packages.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34;
9
 
10
  // phpcs:ignore
11
 
vendor/class-autoloader-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34;
9
 
10
  // phpcs:ignore
11
 
vendor/class-classes-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34;
9
 
10
  // phpcs:ignore
11
 
vendor/class-files-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34;
9
 
10
  // phpcs:ignore
11
 
vendor/class-plugins-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34;
9
 
10
  // phpcs:ignore
11
 
vendor/class-version-selector.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34;
9
 
10
  // phpcs:ignore
11
 
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::getInitializer($loader));
34
  } else {
35
  $classMap = require __DIR__ . '/autoload_classmap.php';
36
  if ($classMap) {
@@ -42,19 +42,19 @@ class ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64
42
  $loader->register(true);
43
 
44
  if ($useStaticLoader) {
45
- $includeFiles = Composer\Autoload\ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$files;
46
  } else {
47
  $includeFiles = require __DIR__ . '/autoload_files.php';
48
  }
49
  foreach ($includeFiles as $fileIdentifier => $file) {
50
- composerRequire430d01c96b612c440e5d3e48a916fb64($fileIdentifier, $file);
51
  }
52
 
53
  return $loader;
54
  }
55
  }
56
 
57
- function composerRequire430d01c96b612c440e5d3e48a916fb64($fileIdentifier, $file)
58
  {
59
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
60
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitc22e67954a676ae766a3df84289c5daa::getInitializer($loader));
34
  } else {
35
  $classMap = require __DIR__ . '/autoload_classmap.php';
36
  if ($classMap) {
42
  $loader->register(true);
43
 
44
  if ($useStaticLoader) {
45
+ $includeFiles = Composer\Autoload\ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$files;
46
  } else {
47
  $includeFiles = require __DIR__ . '/autoload_files.php';
48
  }
49
  foreach ($includeFiles as $fileIdentifier => $file) {
50
+ composerRequirec22e67954a676ae766a3df84289c5daa($fileIdentifier, $file);
51
  }
52
 
53
  return $loader;
54
  }
55
  }
56
 
57
+ function composerRequirec22e67954a676ae766a3df84289c5daa($fileIdentifier, $file)
58
  {
59
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
60
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit430d01c96b612c440e5d3e48a916fb64
8
  {
9
  public static $files = array (
10
  'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/load-ixr.php',
@@ -119,9 +119,9 @@ class ComposerStaticInit430d01c96b612c440e5d3e48a916fb64
119
  public static function getInitializer(ClassLoader $loader)
120
  {
121
  return \Closure::bind(function () use ($loader) {
122
- $loader->prefixLengthsPsr4 = ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$prefixLengthsPsr4;
123
- $loader->prefixDirsPsr4 = ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$prefixDirsPsr4;
124
- $loader->classMap = ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$classMap;
125
 
126
  }, null, ClassLoader::class);
127
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitc22e67954a676ae766a3df84289c5daa
8
  {
9
  public static $files = array (
10
  'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/load-ixr.php',
119
  public static function getInitializer(ClassLoader $loader)
120
  {
121
  return \Closure::bind(function () use ($loader) {
122
+ $loader->prefixLengthsPsr4 = ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$prefixLengthsPsr4;
123
+ $loader->prefixDirsPsr4 = ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$prefixDirsPsr4;
124
+ $loader->classMap = ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$classMap;
125
 
126
  }, null, ClassLoader::class);
127
  }