PageSourceSearch

https://countytheater.org/resources/search.js

js countytheater.org collected 2026-10-02 05:53:09 UTC 2,629 bytes, 85 lines download raw bytes

1function showResult(str)
2		{
3		if (str.length==0)
4		{ 
5			document.getElementById("filmsearch").innerHTML="";
6			document.getElementById("filmsearch").style.border="0px";
7			return;
8  		}
9  		if (window.XMLHttpRequest)
10  		{// code for IE7+, Firefox, Chrome, Opera, Safari
11	  		xmlhttp=new XMLHttpRequest();
12  		}
13  		else
14  		{// code for IE6, IE5
15	  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
16  		}
17  		xmlhttp.onreadystatechange=function()
18  		{
19  		if (xmlhttp.readyState==4 && xmlhttp.status==200)
20  		{
21  		document.getElementById("filmsearch").innerHTML=xmlhttp.responseText;
22    	}
23  		}
24  		xmlhttp.open("GET","search.php?q="+str,true);
25  		xmlhttp.send();
26		}
27		
28    function sendBackEvent() {
29        var textarea = document.getElementById("textarea");
30        if(!textarea) {
31            return;
32        }
33        var ke1 = document.createEvent("Events");
34        ke1.initEvent("keydown", true, true);
35        ke1.keyCode = ke1.which = 8; // Backspace
36        textarea.dispatchEvent(ke1);
37
38        var ke2 = document.createEvent("Events");
39        ke2.initEvent("keyup", true, true);
40        ke2.keyCode = ke2.which = 8; // Backspace
41        textarea.dispatchEvent(ke2);
42    }
43    function handleBackEvent(e) {
44        if(e.keyCode != 8) {
45            return;
46        }
47        if (textarea.value.length == 0) {
48            return;
49        }
50        var text = textarea.value;
51        var selectionStart = textarea.selectionStart;
52        var selectionEnd = textarea.selectionEnd;
53        if (selectionStart < selectionEnd) {
54            var text1 = (selectionStart > 0 ? text.slice(0, selectionStart) : "");
55            var text2 = (selectionEnd < text.length ? text.slice(selectionEnd) : "");
56            textarea.value = text1 + text2;
57        }
58        else if (selectionStart > 0) {
59            var text1 = (selectionStart - 1 > 0 ? text.slice(0, selectionStart - 1) : "");
60            var text2 = (selectionStart < text.length ? text.slice(selectionStart) : "");
61            textarea.value = text1 + text2;
62            selectionStart--;
63        }
64        textarea.selectionStart = textarea.selectionEnd = selectionStart;
65        e.preventDefault();
66        e.stopPropagation();
67        return false;
68    };
69    var textarea;
70    function init() {
71        textarea = document.getElementById("textarea");
72        if(!textarea) {
73            return;
74        }
75        textarea.addEventListener("keydown", handleBackEvent, false);
76    }
77    
78$(document).ready(function() {
79			$(window).keydown(function(event){
80			if(event.keyCode == 13) {
81			event.preventDefault();
82			return false;
83    		}
84  			});
85			});

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.