PageSourceSearch

https://somersetnlv.org/apps/accessibility/asi_at_sr.js

js somersetnlv.org collected 2026-10-06 06:46:26 UTC 1,401 bytes, 44 lines download raw bytes

1function writeAsiForAtSr(formName, keyElementId, inputWidth, inputHeight) {
2	let keyElement = document.getElementById(keyElementId);
3	if (!keyElement) {
4		return;
5	}
6	
7	let asiForAtSr = document.createElement("iframe");
8	asiForAtSr.sandbox = "allow-scripts";
9	asiForAtSr.setAttribute("frameborder", "0");
10	asiForAtSr.setAttribute("scrolling", "no");
11	asiForAtSr.setAttribute("title", "Verification code input frame");
12	asiForAtSr.setAttribute("src", "/apps/accessibility/asi_at_sr.jsp?k=" + keyElement.value+"&inputHeight=" + inputHeight);
13
14	asiForAtSr.style.setProperty("border", "0px");
15	asiForAtSr.style.setProperty("width", inputWidth + "px");
16	asiForAtSr.style.setProperty("height", inputHeight + "px");
17	asiForAtSr.style.setProperty("vertical-align", "middle");
18	
19	this.parentNode.replaceChild(asiForAtSr, this);
20	
21	let form;
22	if (formName) {
23		form = document.querySelector("form[name='" + formName + "']");
24	}
25	
26	window.addEventListener("message", function(e) {
27		if (!e.data || !e.data.type) {
28			return;
29		}		
30		if (e.data.type == "asiKeyUp") {
31			if (e.data.keyCode == 13) {
32				if (form && form.onsubmit) {
33					if (form.onsubmit()) {
34						form.submit();
35					}
36				}
37			} else {
38				document.getElementById("asiInput").value = e.data.asi;
39			}
40		} else if (e.data.type == "invalidAsiKey") {
41			form.innerHTML = "This form has already been submitted. Please refresh the page.";
42		}
43	});
44}

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.