PageSourceSearch

https://www.printmoz.com/static/js/showmore/showMore.min.js

js printmoz.com collected 2026-09-28 08:43:28 UTC 3,518 bytes, 1 lines download raw bytes

1var ShowMore=function(){"use strict";let e=(e,t)=>{let{rows:i,children:l}=e,s=[].slice.call("table"===t?i:l).filter(e=>e.classList.contains("hidden")).length;return 0!==s?" "+s:""},t=function(e,t){return void 0===t&&(t=!1),e.classList[t?"add":"remove"]("hidden")},i=(e,t)=>{for(let i in t)e.setAttribute(i,t[i])},l=e=>document.createElement(e),s={typeElement:"span",more:!1,less:!1,number:!1,nobutton:!1,after:0,btnClass:"show-more-btn",btnClassAppend:null};return class{constructor(n,a){let{onMoreLess:r=()=>{},regex:h={},config:d}=void 0===a?{}:a;this.t=()=>{let{element:e,after:s,ellipsis:n,nobutton:a,limit:r,type:h}=this.s;i(e,{"aria-expanded":"false"});let d=r+s;if("text"===h){let o=e.innerHTML.trim();if(e.textContent.trim().length>d){var c,p;let m=o;for(let b in this.i){let{match:u,replace:f}=this.i[b];b&&u&&(m=m.replace(u,f))}let g,x=(c=m,p=r-1,(g=l("div")).insertAdjacentHTML("afterbegin",c),function e(t,i){let l=t.firstChild;do 3===l.nodeType?i(l):1===l.nodeType&&l.childNodes&&l.childNodes[0]&&e(l,i);while(l=l.nextSibling)}(g,function(e){p>0?(p-=e.data.length)<=0&&(e.data=e.substringData(0,e.data.length+p)):e.data=""}),g.innerHTML).concat(!1===n?"":"...");if(e.textContent="",e.insertAdjacentHTML("beforeend",x),this.l(e,{...this.s,originalText:o,truncatedText:x}),a)return;this.o(this.s)}}if("list"===h||"table"===h){let C=this.h(e,h);if(C.length>d){for(let L=r;L<C.length;L++)t(C[L],!0);if(a||this.o(this.s),this.l("list"===h?e:e.nextElementSibling,this.s),a)return}}},this.l=(e,t)=>e.addEventListener("click",this.p.bind(this,t)),this.m=t=>{let{element:s,number:n,less:a,more:r,type:h,btnClass:d,btnClassAppend:o}=t,c=this.u?a||"":r||"",p=this.u?"collapse":"expand",m=!!this.u,b=l("button");return b.className=null==o?d:d+" "+o,i(b,{"aria-expanded":m,"aria-label":p,tabindex:0}),b.insertAdjacentHTML("beforeend",n?c+e(s,h):c),b},this.p=(e,i)=>{let{target:s}=i,{element:n,type:a,limit:r,less:h,typeElement:d,originalText:o,truncatedText:c,btnClass:p}=e,m=s.classList.contains(p);if(!m)return;let b=n.getAttribute("aria-expanded");if(this.u="false"===b,"text"===a&&m&&(n.textContent="",n.insertAdjacentHTML("beforeend",this.u?o:c),h)){let u=l(d);u.classList.add("show-more-wrapper"),u.insertAdjacentElement("beforeend",this.m(e)),n.appendChild(u)}if("list"===a||"table"===a){let f=this.h(n,a);for(let g=0;g<f.length;g++){let x="list"===a?g>=r&&g<f.length-1:g>=r;"false"===b?t(f[g]):x&&t(f[g],!0)}}a&&this.g({...e,target:s})},this.h=(e,t)=>"list"===t?[].slice.call(e.children):e.rows,this.o=e=>{let{type:t,element:i,more:s,typeElement:n}=e;if(s){if("table"===t)i.insertAdjacentElement("afterend",this.m(e));else{let a=l(n);a.classList.add("show-more-wrapper"),a.appendChild(this.m(e)),i.appendChild(a)}}},this.g=t=>{let{element:l,type:s,less:n,more:a,number:r,target:h}=t,d=this.u?n:a,o=this.u?"expand":"collapse",c=l.lastElementChild;i(l,{"aria-expanded":this.u}),i(h,{"aria-expanded":this.u,"aria-label":o+" "+("table"===s?s:"the "+s)}),this.C(o,t),d?h.innerHTML=r?d+e(l,s):d:"table"===s?h.parentNode.removeChild(h):"list"===s&&c.parentNode.removeChild(c)};let o=[].slice.call(document.querySelectorAll(n));this.C=r,this.i={newLine:{match:/(\r\n|\n|\r)/gm,replace:""},space:{match:/\s\s+/gm,replace:" "},br:{match:/<br\s*\/?>/gim,replace:""},html:{match:/(<((?!b|\/b|!strong|\/strong)[^>]+)>)/gi,replace:""},...h},o.map((e,t)=>{let i=JSON.parse(e.getAttribute("data-config")),l={...d,...i};this.s={index:t,classArray:e.classList,...s,...l,typeElement:l.element||"span",element:e},this.t()})}}}();

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.