PageSourceSearch

https://static.ega-archive.org/js/url-input.min.js

js ega-archive.org collected 2026-10-02 04:10:24 UTC 1,066 bytes, 1 lines download raw bytes

1!function(){class t extends Error{constructor(t,e){super(t),this.name="URLValidationError",this.code=e}}document.querySelectorAll("form .url-input").forEach((e=>{const r=e.querySelector("input[type='url']"),o=Boolean(e.getAttribute("data-accept-http")),a=e.querySelector(".clear"),n=e.querySelector("a");r.addEventListener("keyup",function(t,e=1e3){let r;return(...o)=>{clearTimeout(r),r=setTimeout((()=>t(...o)),e)}}((r=>{const a=r.target.value,s=function(e,r=!1){const o=r?/^https?:\/\/.+/:/^https:\/\/.+/;try{if(!o.test(e)){if(e.startsWith("www."))throw new t(`${e} not a valid URL, try prepending "https://"`,1);throw new t(`${e} not a valid URL`,2)}const a=new URL(e);return"https:"===a.protocol||r&&"http:"===a.protocol}catch(t){return t}}(a,o);s instanceof t?(e.setAttribute("data-status","invalid"),e.setAttribute("data-error-code",s.code)):a?(n.href=a,n.textContent=a,e.setAttribute("data-status","valid")):e.setAttribute("data-status","idle")}),500)),a.addEventListener("click",(t=>{n.href="",n.textContent="",e.setAttribute("data-status","idle")}))}))}();

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.