PageSourceSearch

https://openmv.io/cdn/shop/t/26/assets/ajaxinate.js?v=72875243424559839971772143670

js openmv.io collected 2026-09-24 22:06:57 UTC 5,058 bytes, 16 lines download raw bytes

1"use strict";/* ===================================================================================== @preserve =
2 ___  _   _    _
3/   || | | |  | |
4\__  | | | |  | |  __
5/    |/  |/_) |/  /  \_/\/
6\___/|__/| \_/|__/\__/  /\_/
7              |\
8              |/
9Ajaxinate
10version v2.0.11
11https://github.com/Elkfox/Ajaxinate
12Copyright (c) 2017 Elkfox Co Pty Ltd
13https://elkfox.com
14MIT License
15================================================================================================= */var Ajaxinate=function(config){var settings=config||{},defaultSettings={pagination:"#ajaxPagination",method:"scroll",container:"#AjaxinateLoop",offset:0,loadingText:'<div class="collection-loader"></div>',callback:null};this.settings=Object.assign(defaultSettings,settings),this.addScrollListeners=this.addScrollListeners.bind(this),this.addClickListener=this.addClickListener.bind(this),this.checkIfPaginationInView=this.checkIfPaginationInView.bind(this),this.stopMultipleClicks=this.stopMultipleClicks.bind(this),this.destroy=this.destroy.bind(this),this.containerElement=document.querySelector(this.settings.container),this.paginationElement=document.querySelector(this.settings.pagination),this.initialize()};Ajaxinate.prototype.initialize=function(){if(this.containerElement){var initializers={click:this.addClickListener,scroll:this.addScrollListeners};initializers[this.settings.method]();var eventLoadMore=new CustomEvent("shopify-collection-loader:init-product-grid",{detail:{loadmore:!0}});document.dispatchEvent(eventLoadMore)}},Ajaxinate.prototype.addScrollListeners=function(){this.paginationElement&&(document.addEventListener("scroll",this.checkIfPaginationInView),window.addEventListener("resize",this.checkIfPaginationInView),window.addEventListener("orientationchange",this.checkIfPaginationInView))},Ajaxinate.prototype.addClickListener=function(){this.paginationElement&&(this.nextPageLinkElement=this.paginationElement.querySelector("a"),this.clickActive=!0,this.nextPageLinkElement!==null&&this.nextPageLinkElement.addEventListener("click",this.stopMultipleClicks))},Ajaxinate.prototype.stopMultipleClicks=function(event){event.preventDefault(),this.clickActive&&(this.nextPageLinkElement.innerHTML=this.settings.loadingText,this.nextPageUrl=this.nextPageLinkElement.href,this.clickActive=!1,this.loadMore())},Ajaxinate.prototype.checkIfPaginationInView=function(){var top=this.paginationElement.getBoundingClientRect().top-this.settings.offset,bottom=this.paginationElement.getBoundingClientRect().bottom+this.settings.offset,isOutOfViewport=function(elem){var bounding=elem.getBoundingClientRect(),bottom2=bounding.bottom,out={};return out.top=bounding.top<0,out.left=bounding.left<0,out.bottom=bottom2>(window.innerHeight||document.documentElement.clientHeight),out.right=bounding.right>(window.innerWidth||document.documentElement.clientWidth),out.any=out.top||out.left||out.bottom||out.right,out.all=out.top&&out.left&&out.bottom&&out.right,out},isOut=isOutOfViewport(this.paginationElement);isOut.bottom==!1&&top!=0&&bottom!=0&&(this.nextPageLinkElement=this.paginationElement.querySelector("a"),this.removeScrollListener(),this.nextPageLinkElement&&(this.nextPageLinkElement.innerHTML=this.settings.loadingText,this.nextPageUrl=this.nextPageLinkElement.href,this.loadMore()))},Ajaxinate.prototype.loadMore=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){if(this.request.readyState===4&&this.request.status===200){var res=this.request.responseText,parser=new DOMParser,doc=parser.parseFromString(res,"text/html");console.log("responseText",doc.querySelectorAll(this.settings.container)[0]);var newContainer=doc.querySelectorAll(this.settings.container)[0],newPagination=doc.querySelectorAll(this.settings.pagination)[0];this.containerElement.insertAdjacentHTML("beforeend",newContainer.innerHTML),this.paginationElement.innerHTML=newPagination.innerHTML,this.settings.callback&&typeof this.settings.callback=="function"&&this.settings.callback(doc),this.initialize()}}.bind(this),this.request.open("GET",this.nextPageUrl),this.request.send()},Ajaxinate.prototype.removeClickListener=function(){this.nextPageLinkElement.addEventListener("click",this.stopMultipleClicks)},Ajaxinate.prototype.removeScrollListener=function(){document.removeEventListener("scroll",this.checkIfPaginationInView),window.removeEventListener("resize",this.checkIfPaginationInView),window.removeEventListener("orientationchange",this.checkIfPaginationInView)},Ajaxinate.prototype.destroy=function(){var destroyers={click:this.removeClickListener,scroll:this.removeScrollListener};return destroyers[this.settings.method](),this},document.addEventListener("DOMContentLoaded",function(){var endlessScroll=ne
15w Ajaxinate({container:".products-on-page",pagination:"#ajaxPagination"})}),document.addEventListener("DOMContentLoaded",function(){var endlessScroll=new Ajaxinate({container:".blogs-on-page",pagination:"#ajaxPaginationBlog"})});
16//# sourceMappingURL=/cdn/shop/t/26/assets/ajaxinate.js.map?v=72875243424559839971772143670

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.