PageSourceSearch

https://www.tstc.edu/wp-content/uploads/autoptimize/1/js/autoptimi…_single_0c6c020c30a502a87ecbe4bb2b8b15d9.js

js tstc.edu collected 2026-09-24 09:12:21 UTC 1,771 bytes, 6 lines download raw bytes

1class TextInput{constructor(inputEl){this.inputEl=inputEl;this.placeholder=inputEl.dataset.label||'Enter text';this.onChangeCallback=inputEl.dataset.onchange;this.wrapper=document.createElement('div');this.wrapper.className='custom-textinput';this.inputBox=document.createElement('input');this.inputBox.type='text';this.inputBox.className='text-input';this.inputBox.placeholder=this.placeholder;this.inputBox.value=inputEl.value||'';this.wrapper.appendChild(this.inputBox);inputEl.after(this.wrapper);inputEl.style.display='none';this.attachEvents();}
2attachEvents(){this.inputBox.addEventListener('input',(e)=>{const value=e.target.value;this.inputEl.value=value;this.inputEl.dispatchEvent(new Event('input'));if(this.onChangeCallback&&typeof window[this.onChangeCallback]==='function'){window[this.onChangeCallback](value);}});this.inputBox.addEventListener('change',()=>{this.inputEl.dispatchEvent(new Event('change'));});}
3static setValue(id,value,fireCallback=true){const input=document.getElementById(id);const wrapper=input?.nextElementSibling;if(input&&wrapper?.classList.contains('custom-textinput')){const textInput=wrapper.querySelector('.text-input');textInput.value=value;input.value=value;if(fireCallback){const callbackName=input.dataset.onchange;if(callbackName&&typeof window[callbackName]==='function'){window[callbackName](value);}}}}
4static clear(id){TextInput.setValue(id,'',false);}
5static setLoadingState(id,isLoading){const input=document.getElementById(id);const wrapper=input?.nextElementSibling;if(input&&wrapper?.classList.contains('custom-textinput')){wrapper.classList.toggle('loading',isLoading);}}}
6document.addEventListener('DOMContentLoaded',()=>{document.querySelectorAll('input.tstc-ui[type="text"]').forEach(el=>new TextInput(el));});

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.