PageSourceSearch

https://www.tcpress.com/cdn/shop/t/12/assets/search-form.js?v=33089049595352939141779975429

js tcpress.com collected 2026-09-24 08:42:01 UTC 1,815 bytes, 2 lines download raw bytes

1class SearchForm extends HTMLElement{constructor(){super(),this.input=this.querySelector('input[type="search"]'),this.resetButton=this.querySelector('button[type="reset"]'),this.input&&(this.input.form.addEventListener("reset",this.onFormReset.bind(this)),(this.input.dataset.secondPlaceholder||this.input.dataset.thirdPlaceholder||this.input.dataset.fourthPlaceholder)&&(this.input.dataset.animatedPlaceholderMob==="true"||!window.matchMedia("(max-width: 749.98px)").matches)&&this.typewriter())}shouldResetForm(){return!document.querySelector('[aria-selected="true"] a')}onFormReset(event){event?.preventDefault(),this.shouldResetForm()&&(this.input.value="",this.input.focus())}async typewriter(){const placeholders=[this.input.placeholder,this.input.dataset.secondPlaceholder,this.input.dataset.thirdPlaceholder,this.input.dataset.fourthPlaceholder].filter(Boolean);if(placeholders.length===0)return;const wait=ms=>new Promise(resolve=>setTimeout(resolve,ms)),typeText=async target=>{let current=this.input.getAttribute("placeholder")||"",remaining=current.length>=3&&target.startsWith(current)?target.slice(current.length):target;for(const char of remaining)current+=char,this.input.setAttribute("placeholder",current),await wait(40)},deleteText=async nextTarget=>{let current=this.input.getAttribute("placeholder")||"";for(;current.length>0&&!(current.length>=3&&nextTarget.startsWith(current));)current=current.slice(0,-1),this.input.setAttribute("placeholder",current),await wait(40*.75)};await wait(2e3);let index=0;for(;;){const next=placeholders[index=(index+1)%placeholders.length];await deleteText(next),await wait(400),await typeText(next),await wait(3e3)}}}customElements.define("search-form",SearchForm);
2//# sourceMappingURL=/cdn/shop/t/12/assets/search-form.js.map?v=33089049595352939141779975429

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.