[]1)},!0)}},{}],5:[function(t,e,n){function r(t){}if(window.performance&&window.performance.timing&&window.performance.getEntriesByType){var o=t(“ee”),i=t(“handle”),a=t(13),s=t(12),c=”learResourceTimings”,f=”addEventListener”,u=”resourcetimingbufferfull”,d=”bstResource”,p=”resource”,l=”-start”,h=”-end”,m=”fn”+l,v=”fn”+h,w=”bstTimer”,g=”pushState”,y=t(“loader”);if(!y.disabled){y.features.stn=!0,t(8),”addEventListener”in window&&t(6);var x=NREUM.o.EV;o.on(m,function(t,e){var n=t[0];n instanceof x&&(this.bstStart=y.now())}),o.on(v,function(t,e){var n=t[0];n instanceof x&&i(“bst”,[n,e,this.bstStart,y.now()])}),a.on(m,function(t,e,n){this.bstStart=y.now(),this.bstType=n}),a.on(v,function(t,e){i(w,[e,this.bstStart,y.now(),this.bstType])}),s.on(m,function(){this.bstStart=y.now()}),s.on(v,function(t,e){i(w,[e,this.bstStart,y.now(),”requestAnimationFrame”])}),o.on(g+l,function(t){this.time=y.now(),this.startPath=location.pathname+location.hash}),o.on(g+h,function(t){i(“bstHist”,[location.pathname+location.hash,this.startPath,this.time])}),f in window.performance&&(window.performance[“c”+c]?window.performance[f](u,function(t){i(d,[window.performance.getEntriesByType(p)]),window.performance[“c”+c]()},!1):window.performance[f](“webkit”+u,function(t){i(d,[window.performance.getEntriesByType(p)]),window.performance[“webkitC”+c]()},!1)),document[f](“scroll”,r,{passive:!0}),document[f](“keypress”,r,!1),document[f](“click”,r,!1)}}},{}],6:[function(t,e,n){function r(t){for(var e=t;e&&!e.hasOwnProperty(u);)e=Object.getPrototypeOf(e);e&&o(e)}function o(t){s.inPlace(t,[u,d],”-“,i)}function i(t,e){return t[1]}var a=t(“ee”).get(“events”),s=t(“wrap-function”)(a,!0),c=t(“gos”),f=XMLHttpRequest,u=”addEventListener”,d=”removeEventListener”;e.exports=a,”getPrototypeOf”in Object?(r(document),r(window),r(f.prototype)):f.prototype.hasOwnProperty(u)&&(o(window),o(f.prototype)),a.on(u+”-start”,function(t,e){var n=t[1],r=c(n,”nr@wrapped”,function(){function t(){if(“function”==typeof n.handleEvent)return n.handleEvent.apply(n,arguments)}var e={object:t,”function”:n}[typeof n];return e?s(e,”fn-“,null,e.name||”anonymous”):n});this.wrapped=t[1]=r}),a.on(d+”-start”,function(t){t[1]=this.wrapped||t[1]})},{}],7:[function(t,e,n){function r(t,e,n){var r=t[e];”function”==typeof r&&(t[e]=function(){var t=i(arguments),e={};o.emit(n+”before-start”,[t],e);var a;e[m]&&e[m].dt&&(a=e[m].dt);var s=r.apply(this,t);return o.emit(n+”start”,[t,a],s),s.then(function(t){return o.emit(n+”end”,[null,t],s),t},function(t){throw o.emit(n+”end”,[t],s),t})})}var o=t(“ee”).get(“fetch”),i=t(30),a=t(29);e.exports=o;var s=window,c=”fetch-“,f=c+”body-“,u=[“arrayBuffer”,”blob”,”json”,”text”,”formData”],d=s.Request,p=s.Response,l=s.fetch,h=”prototype”,m=”nr@context”;d&&p&&l&&(a(u,function(t,e){r(d[h],e,f),r(p[h],e,f)}),r(s,”fetch”,c),o.on(c+”end”,function(t,e){var n=this;if(e){var r=e.headers.get(“content-length”);null!==r&&(n.rxSize=r),o.emit(c+”done”,[null,e],n)}else o.emit(c+”done”,[t],n)}))},{}],8:[function(t,e,n){var r=t(“ee”).get(“history”),o=t(“wrap-function”)(r);e.exports=r;var i=window.history&&window.history.constructor&&window.history.constructor.prototype,a=window.history;i&&i.pushState&&i.replaceState&&(a=i),o.inPlace(a,[“pushState”,”replaceState”],”-“)},{}],9:[function(t,e,n){function r(t){function e(){c.emit(“jsonp-end”,[],p),t.removeEventListener(“load”,e,!1),t.removeEventListener(“error”,n,!1)}function n(){c.emit(“jsonp-error”,[],p),c.emit(“jsonp-end”,[],p),t.removeEventListener(“load”,e,!1),t.removeEventListener(“error”,n,!1)}var r=t&&”string”==typeof t.nodeName&&”script”===t.nodeName.toLowerCase();if(r){var o=”function”==typeof t.addEventListener;if(o){var a=i(t.src);if(a){var u=s(a),d=”function”==typeof u.parent[u.key];if(d){var p={};f.inPlace(u.parent,[u.key],”cb-“,p),t.addEventListener(“load”,e,!1),t.addEventListener(“error”,n,!1),c.emit(“new-jsonp”,[t.src],p)}}}}}function o(){return”addEventListener”in window}function i(t){var e=t.match(u);return e?e[1]:null}function a(t,e){var n=t.match(p),r=n[1],o=n[3];return o?a(o,e[r]):e[r]}function s(t){var e=t.match(d);return e&&e.length>=3?{key:e[2],parent:a(e[1],window)}:{key:t,parent:window}}var c=t(“ee”).get(“jsonp”),f=t(“wrap-function”)(c);if(e.exports=c,o()){var u=/[?&](?:callback|cb)=([^&#]+)/,d=/(.*).([^.]+)/,p=/^(w+)(.|$)(.*)$/,l=[“appendChild”,”insertBefore”,”replaceChild”];Node&&Node.prototype&&Node.prototype.appendChild?f.inPlace(Node.prototype,l,”dom-“):(f.inPlace(HTMLElement.prototype,l,”dom-“),f.inPlace(HTMLHeadElement.prototype,l,”dom-“),f.inPlace(HTMLBodyElement.prototype,l,”dom-“)),c.on(“dom-start”,function(t){r(t[0])})}},{}],10:[function(t,e,n){var r=t(“ee”).get(“mutation”),o=t(“wrap-function”)(r),i=NREUM.o.MO;e.exports=r,i&&(window.MutationObserver=function(t){return this instanceof i?new i(o(t,”fn-“)):i.apply(this,arguments)},MutationObserver.prototype=i.prototype)},{}],11:[function(t,e,n){function r(t){var e=i.context(),n=s(t,”executor-“,e,null,!1),r=new f(n);return i.context(r).getCtx=function(){return e},r}var o=t(“wrap-function”),i=t(“ee”).get(“promise”),a=t(“ee”).getOrSetContext,s=o(i),c=t(29),f=NREUM.o.PR;e.exports=i,f&&(window.Promise=r,[“all”,”race”].forEach(function(t){var e=f[t];f[t]=function(n){function r(t){return function(){i.emit(“propagate”,[null,!o],a,!1,!1),o=o||!t}}var o=!1;c(n,function(e,n){Promise.resolve(n).then(r(“all”===t),r(!1))});var a=e.apply(f,arguments),s=f.resolve(a);return s}}),[“resolve”,”reject”].forEach(function(t){var e=f[t];f[t]=function(t){var n=e.apply(f,arguments);return t!==n&&i.emit(“propagate”,[t,!0],n,!1,!1),n}}),f.prototype[“catch”]=function(t){return this.then(null,t)},f.prototype=Object.create(f.prototype,{constructor:{value:r}}),c(Object.getOwnPropertyNames(f),function(t,e){try{r[e]=f[e]}catch(n){}}),o.wrapInPlace(f.prototype,”then”,function(t){return function(){var e=this,n=o.argsToArray.apply(this,arguments),r=a(e);r.promise=e,n[0]=s(n[0],”cb-“,r,null,!1),n[1]=s(n[1],”cb-“,r,null,!1);var c=t.apply(this,n);return r.nextPromise=c,i.emit(“propagate”,[e,!0],c,!1,!1),c}}),i.on(“executor-start”,function(t){t[0]=s(t[0],”resolve-“,this,null,!1),t[1]=s(t[1],”resolve-“,this,null,!1)}),i.on(“executor-err”,function(t,e,n){t[1](n)}),i.on(“cb-end”,function(t,e,n){i.emit(“propagate”,[n,!0],this.nextPromise,!1,!1)}),i.on(“propagate”,function(t,e,n){this.getCtx&&!e||(this.getCtx=function(){if(t instanceof Promise)var e=i.context(t);return e&&e.getCtx?e.getCtx():this})}),r.toString=function(){return””+f})},{}],12:[function(t,e,n){var r=t(“ee”).get(“raf”),o=t(“wrap-function”)(r),i=”equestAnimationFrame”;e.exports=r,o.inPlace(window,[“r”+i,”mozR”+i,”webkitR”+i,”msR”+i],”raf-“),r.on(“raf-start”,function(t){t[0]=o(t[0],”fn-“)})},{}],13:[function(t,e,n){function r(t,e,n){t[0]=a(t[0],”fn-“,null,n)}function o(t,e,n){this.method=n,this.timerDuration=isNaN(t[1])?0:+t[1],t[0]=a(t[0],”fn-“,this,n)}var i=t(“ee”).get(“timer”),a=t(“wrap-function”)(i),s=”setTimeout”,c=”setInterval”,f=”clearTimeout”,u=”-start”,d=”-“;e.exports=i,a.inPlace(window,[s,”setImmediate”],s+d),a.inPlace(window,[c],c+d),a.inPlace(window,[f,”clearImmediate”],f+d),i.on(c+u,r),i.on(s+u,o)},{}],14:[function(t,e,n){function r(t,e){d.inPlace(e,[“onreadystatechange”],”fn-“,s)}function o(){var t=this,e=u.context(t);t.readyState>3&&!e.resolved&&(e.resolved=!0,u.emit(“xhr-resolved”,[],t)),d.inPlace(t,g,”fn-“,s)}function i(t){y.push(t),h&&(b?b.then(a):v?v(a):(E=-E,R.data=E))}function a(){for(var t=0;t34||h<10)||window.opera||t.addEventListener("progress",function(t){e.lastSize=t.loaded},!1)}),u.on("open-xhr-start",function(t){this.params={method:t[0]},o(this,t[1]),this.metrics={}}),u.on("open-xhr-end",function(t,e){"loader_config"in NREUM&&"xpid"in NREUM.loader_config&&this.sameOrigin&&e.setRequestHeader("X-NewRelic-ID",NREUM.loader_config.xpid);var n=f(this.parsedOrigin);if(n){var r=!1;n.newrelicHeader&&(e.setRequestHeader("newrelic",n.newrelicHeader),r=!0),n.traceContextParentHeader&&(e.setRequestHeader("traceparent",n.traceContextParentHeader),n.traceContextStateHeader&&e.setRequestHeader("tracestate",n.traceContextStateHeader),r=!0),r&&(this.dt=n)}}),u.on("send-xhr-start",function(t,e){var n=this.metrics,r=t[0],o=this;if(n&&r){var i=m(r);i&&(n.txSize=i)}this.startTime=a.now(),this.listener=function(t){try{"abort"!==t.type||o.loadCaptureCalled||(o.params.aborted=!0),("load"!==t.type||o.called===o.totalCbs&&(o.onloadCalled||"function"!=typeof e.onload))&&o.end(e)}catch(n){try{u.emit("internal-error",[n])}catch(r){}}};for(var s=0;s

1?t[1]=i:t.push(i)}else t[0]&&t[0].headers&&e(t[0].headers,o)&&(this.dt=o)}),u.on(“fetch-start”,function(t,e){this.params={},this.metrics={},this.startTime=a.now(),t.length>=1&&(this.target=t[0]),t.length>=2&&(this.opts=t[1]);var n,r=this.opts||{},i=this.target;”string”==typeof i?n=i:”object”==typeof i&&i instanceof w?n=i.url:window.URL&&”object”==typeof i&&i instanceof URL&&(n=i.href),o(this,n);var s=(“”+(i&&i instanceof w&&i.method||r.method||”GET”)).toUpperCase();this.params.method=s,this.txSize=m(r.body)||0}),u.on(“fetch-done”,function(t,e){this.params||(this.params={}),this.params.status=e?e.status:0;var n;”string”==typeof this.rxSize&&this.rxSize.length>0&&(n=+this.rxSize);var r={txSize:this.txSize,rxSize:n,duration:a.now()-this.startTime};s(“xhr”,[this.params,r,this.startTime])})}},{}],17:[function(t,e,n){var r={};e.exports=function(t){if(t in r)return r[t];var e=document.createElement(“a”),n=window.location,o={};e.href=t,o.port=e.port;var i=e.href.split(“://”);!o.port&&i[1]&&(o.port=i[1].split(“/”)[0].split(“@”).pop().split(“:”)[1]),o.port&&”0″!==o.port||(o.port=”https”===i[0]?”443″:”80″),o.hostname=e.hostname||n.hostname,o.pathname=e.pathname,o.protocol=i[0],”/”!==o.pathname.charAt(0)&&(o.pathname=”/”+o.pathname);var a=!e.protocol||”:”===e.protocol||e.protocol===n.protocol,s=e.hostname===document.domain&&e.port===n.port;return o.sameOrigin=a&&(!e.hostname||s),”/”===o.pathname&&(r[t]=o),o}},{}],18:[function(t,e,n){function r(t,e){var n=t.responseType;return”json”===n&&null!==e?e:”arraybuffer”===n||”blob”===n||”json”===n?o(t.response):”text”===n||””===n||void 0===n?o(t.responseText):void 0}var o=t(21);e.exports=r},{}],19:[function(t,e,n){function r(){}function o(t,e,n){return function(){return i(t,[f.now()].concat(s(arguments)),e?null:this,n),e?void 0:this}}var i=t(“handle”),a=t(29),s=t(30),c=t(“ee”).get(“tracer”),f=t(“loader”),u=NREUM;”undefined”==typeof window.newrelic&&(newrelic=u);var d=[“setPageViewName”,”setCustomAttribute”,”setErrorHandler”,”finished”,”addToTrace”,”inlineHit”,”addRelease”],p=”api-“,l=p+”ixn-“;a(d,function(t,e){u[e]=o(p+e,!0,”api”)}),u.addPageAction=o(p+”addPageAction”,!0),u.setCurrentRouteName=o(p+”routeName”,!0),e.exports=newrelic,u.interaction=function(){return(new r).get()};var h=r.prototype={createTracer:function(t,e){var n={},r=this,o=”function”==typeof e;return i(l+”tracer”,[f.now(),t,n],r),function(){if(c.emit((o?””:”no-“)+”fn-start”,[f.now(),r,o],n),o)try{return e.apply(this,arguments)}catch(t){throw c.emit(“fn-err”,[arguments,this,t],n),t}finally{c.emit(“fn-end”,[f.now()],n)}}}};a(“actionText,setName,setAttribute,save,ignore,onEnd,getContext,end,get”.split(“,”),function(t,e){h[e]=o(l+e)}),newrelic.noticeError=function(t,e){“string”==typeof t&&(t=new Error(t)),i(“err”,[t,f.now(),!1,e])}},{}],20:[function(t,e,n){function r(t){if(NREUM.init){for(var e=NREUM.init,n=t.split(“.”),r=0;r0&&d(“lcp”,[n[n.length-1]])}function i(t){t.getEntries().forEach(function(t){t.hadRecentInput||d(“cls”,[t])})}function a(t){if(t instanceof h&&!v){var e=Math.round(t.timeStamp),n={type:t.type};ep.offset&&e<=Date.now()?(e-=p.offset,n.fid=p.now()-e):e=p.now(),v=!0,d("timing",["fi",e,n])}}function s(t){"hidden"===t&&d("pageHide",[p.now()])}if(!("init"in NREUM&&"page_view_timing"in NREUM.init&&"enabled"in NREUM.init.page_view_timing&&NREUM.init.page_view_timing.enabled===!1)){var c,f,u,d=t("handle"),p=t("loader"),l=t(28),h=NREUM.o.EV;if("PerformanceObserver"in window&&"function"==typeof window.PerformanceObserver){c=new PerformanceObserver(r);try{c.observe({entryTypes:["paint"]})}catch(m){}f=new PerformanceObserver(o);try{f.observe({entryTypes:["largest-contentful-paint"]})}catch(m){}u=new PerformanceObserver(i);try{u.observe({type:"layout-shift",buffered:!0})}catch(m){}}if("addEventListener"in document){var v=!1,w=["click","keydown","mousedown","pointerdown","touchstart"];w.forEach(function(t){document.addEventListener(t,a,!1)})}l(s)}},{}],26:[function(t,e,n){function r(){function t(){return e?15&e[n++]:16*Math.random()|0}var e=null,n=0,r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(e=r.getRandomValues(new Uint8Array(31)));for(var o,i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",a="",s=0;s -1; } function monsterinsights_forms_record_conversion( event ) { var monsterinsights_form_conversion_id = event.target.id; var monsterinsights_form_action = event.target.getAttribute(“miforms-action”); if ( monsterinsights_form_conversion_id && ! monsterinsights_form_action ) { document.getElementById(monsterinsights_form_conversion_id).setAttribute(“miforms-action”, “submitted”); __gtagTracker(‘event’, ‘conversion’, { event_category: ‘form’, event_label: monsterinsights_form_conversion_id, value: 1, }); } } /* Attach the events to all clicks in the document after page and GA has loaded */ function monsterinsights_forms_load() { if ( typeof(__gaTracker) !== ‘undefined’ && __gaTracker && __gaTracker.hasOwnProperty( “loaded” ) && __gaTracker.loaded == true ) { var __gaFormsTrackerWindow = window; if ( __gaFormsTrackerWindow.addEventListener ) { __gaFormsTrackerWindow.addEventListener( “load”, monsterinsights_forms_record_impression, false ); } else { if ( __gaFormsTrackerWindow.attachEvent ) { __gaFormsTrackerWindow.attachEvent(“onload”, monsterinsights_forms_record_impression ); } } } else if ( typeof(__gtagTracker) !== ‘undefined’ && __gtagTracker ) { var __gtagFormsTrackerWindow = window; if ( __gtagFormsTrackerWindow.addEventListener ) { __gtagFormsTrackerWindow.addEventListener( “load”, monsterinsights_forms_record_impression, false ); } else { if ( __gtagFormsTrackerWindow.attachEvent ) { __gtagFormsTrackerWindow.attachEvent(“onload”, monsterinsights_forms_record_impression ); } } } else { setTimeout(monsterinsights_forms_load, 200); } } /* Custom Ninja Forms impression tracking */ if (window.jQuery) { jQuery(document).on( ‘nfFormReady’, function( e, layoutView ) { var label = layoutView.el; label = label.substring(1, label.length); label = label.split(‘-‘).slice(0,3).join(‘-‘); __gtagTracker(‘event’, ‘impression’, { event_category: ‘form’, event_label: label, value: 1, non_interaction: true }); }); } /* Custom Bloom Form tracker */ function monsterinsights_add_bloom_forms_ids() { var bloom_forms = document.querySelectorAll( ‘.et_bloom_form_content form’ ); if ( bloom_forms.length > 0 ) { for ( var i = 0; i < bloom_forms.length; i++ ) { if ( '' === bloom_forms[i].id ) { var form_parent_root = monsterinsights_find_parent_with_class( bloom_forms[i], 'et_bloom_optin' ); if ( form_parent_root ) { var classes = form_parent_root.className.split( ' ' ); for ( var j = 0; j = 0 ) { return element.parentNode; } else { return monsterinsights_find_parent_with_class( element.parentNode, className ); } } return false; } monsterinsights_forms_load(); ]]>

David and Cory discuss a blog post David published at Post Status showing the growth of active installs of WordPress plugins declining in 2021.

In this episode of Post Status Excerpt, David Bisset and Cory Miller focus on a blog post David published on July 23rd at Post Status entitled “Is The Growth Of Active Installs of WordPress Plugins Declining in 2021?” Since about May or early June, the overall trends for some of the most popular and well-known plugins’ “active install growth” (as reported by WordPress.org) are pointing generally downward — their growth is in decline.

Also covered in this episode: Cory shares what he observed at iThemes regarding sales trends and how it might be related to the trends reported by Post Status. David thanks Ian Paulson for backing his observations with some solid numbers.

Every week Post Status Excerpt will brief you on important WordPress news — in about 15 minutes or less! Learn what’s new in WordPress in a flash.

Browse our archives, and don’t forget to subscribe via iTunes, Google Podcasts, YouTube, Stitcher, Simplecast, or RSS.

Mentioned in the show:#

Take the guesswork out of building, maintaining, and securing WordPress websites. Professional plugins and training from iThemes help you create and manage your sites. Secure, back up, and manage them quickly and easily. Master leading-edge WordPress skills to grow your business and make more money. Learn and grow with the experts at iThemes.

Related Posts

envelope Post Status Excerpt (No. 18) — Is Growth Of Active Plugin Installs On The Decline? design tips Grab the Newsletter

Every week, the Post Status team puts together the best news and analysis in the WordPress ecosystem and sends it straight to your inbox.

= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find(‘#gform_wrapper_3’);var is_confirmation = jQuery(this).contents().find(‘#gform_confirmation_wrapper_3’).length > 0;var is_redirect = contents.indexOf(‘gformRedirect(){‘) >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery(‘html’).css(‘margin-top’), 10) + parseInt(jQuery(‘body’).css(‘margin-top’), 10) + 100;if(is_form){jQuery(‘#gform_wrapper_3’).html(form_content.html());if(form_content.hasClass(‘gform_validation_error’)){jQuery(‘#gform_wrapper_3’).addClass(‘gform_validation_error’);} else {jQuery(‘#gform_wrapper_3’).removeClass(‘gform_validation_error’);}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */ jQuery(document).scrollTop(jQuery(‘#gform_wrapper_3’).offset().top – mt); }, 50 );if(window[‘gformInitDatepicker’]) {gformInitDatepicker();}if(window[‘gformInitPriceFields’]) {gformInitPriceFields();}var current_page = jQuery(‘#gform_source_page_number_3’).val();gformInitSpinner( 3, ‘https://cdn.poststatus.com/wp-content/plugins/gravityforms/images/spinner.svg’ );jQuery(document).trigger(‘gform_page_loaded’, [3, current_page]);window[‘gf_submitting_3’] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find(‘.GF_AJAX_POSTBACK’).html();if(!confirmation_content){confirmation_content = contents;}setTimeout(function(){jQuery(‘#gform_wrapper_3’).replaceWith(confirmation_content);jQuery(document).scrollTop(jQuery(‘#gf_3’).offset().top – mt);jQuery(document).trigger(‘gform_confirmation_loaded’, [3]);window[‘gf_submitting_3’] = false;wp.a11y.speak(jQuery(‘#gform_confirmation_message_3’).text());}, 50);}else{jQuery(‘#gform_3’).append(contents);if(window[‘gformRedirect’]) {gformRedirect();}}jQuery(document).trigger(‘gform_post_render’, [3, current_page]);} );} ); ]]>

star Post Status Excerpt (No. 18) — Is Growth Of Active Plugin Installs On The Decline? design tips Featured WordPress Job Openings

{“cart_token”:””,”hash”:””,”cart_data”:””}

3) { var type = ‘event’; var eventName = ‘timing_complete’; fieldsArray = { event_category : ‘Scroll Depth’, name : action, event_label : label, value : timing, non_interaction: 1 }; MonsterInsightsObject.sendEvent( type, eventName, fieldsArray ); } } function calculateMarks(docHeight) { return { ‘25%’ : parseInt(docHeight * 0.25, 10), ‘50%’ : parseInt(docHeight * 0.50, 10), ‘75%’ : parseInt(docHeight * 0.75, 10), /* Cushion to trigger 100% event in iOS */ ‘100%’: docHeight – 5 }; } function checkMarks(marks, scrollDistance, timing) { /* Check each active mark */ $.each(marks, function(key, val) { if ( $.inArray(key, cache) === -1 && scrollDistance >= val ) { sendEvent(‘Percentage’, key, scrollDistance, timing); cache.push(key); } }); } function rounded(scrollDistance) { /* Returns String */ return (Math.floor(scrollDistance/250) * 250).toString(); } function init() { bindScrollDepth(); } /* * Public Methods */ /* Reset Scroll Depth with the originally initialized options */ $.scrollDepth.reset = function() { cache = []; lastPixelDepth = 0; $window.off(‘scroll.scrollDepth’); bindScrollDepth(); }; /* Add DOM elements to be tracked */ $.scrollDepth.addElements = function(elems) { if (typeof elems == “undefined” || !$.isArray(elems)) { return; } $.merge(options.elements, elems); /* If scroll event has been unbound from window, rebind */ if (!scrollEventBound) { bindScrollDepth(); } }; /* Remove DOM elements currently tracked */ $.scrollDepth.removeElements = function(elems) { if (typeof elems == “undefined” || !$.isArray(elems)) { return; } $.each(elems, function(index, elem) { var inElementsArray = $.inArray(elem, options.elements); var inCacheArray = $.inArray(elem, cache); if (inElementsArray != -1) { options.elements.splice(inElementsArray, 1); } if (inCacheArray != -1) { cache.splice(inCacheArray, 1); } }); }; /* * Throttle function borrowed from: * Underscore.js 1.5.2 * http://underscorejs.org * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Underscore may be freely distributed under the MIT license. */ function throttle(func, wait) { var context, args, result; var timeout = null; var previous = 0; var later = function() { previous = new Date; timeout = null; result = func.apply(context, args); }; return function() { var now = new Date; if (!previous) previous = now; var remaining = wait – (now – previous); context = this; args = arguments; if (remaining ‘ );( document.contains ) || document.write( ” + ‘ipt>’ );( window.DOMRect ) || document.write( ” + ‘ipt>’ );( window.URL && window.URL.prototype && window.URLSearchParams ) || document.write( ” + ‘ipt>’ );( window.FormData && window.FormData.prototype.keys ) || document.write( ” + ‘ipt>’ );( Element.prototype.matches && Element.prototype.closest ) || document.write( ” + ‘ipt>’ );( ‘objectFit’ in document.documentElement.style ) || document.write( ” + ‘ipt>’ ); ]]>
Source