1!(function (a) { 2 "use strict"; 3 a(function () { 4 function b(a) { 5 return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); 6 } 7 a("form#searchform #fake-complete").position({ my: "left top", at: "left top", of: a("form#searchform input[type=text]") }), 8 a("#searchOpen").click(function () { 9 a("#search").addClass("active"), a("#s").val("").focus(); 10 }), 11 a(".searchClose").click(function () { 12 a("#s").val(""), a("#search").removeClass("active"); 13 }), 14 a("#s").on("input", null, null, function (c) { 15 var d = a(this).val(), 16 e = !1; 17 setTimeout(function () { 18 a("#s").data("old", d); 19 }, 100), 20 a("#s").data("old") && (e = a("#s").data("old").length > d.length), 21 (0 === d.length || e || a("#fake-complete").val().length > 1) && a("#fake-complete").val(""), 22 d.length > 2 && 23 !e && 24 a 25 .ajax({ type: "get", url: vars.url, dataType: "json", data: { action: "ajax_autocomplete", term: d, gr_nonce: vars.gr_nonce } }) 26 .done(function (c) { 27 if (0 !== c) { 28 var e = new RegExp("^" + b(d), "i"), 29 f = a.grep(c, function (a, b) { 30 return e.test(a.label); 31 }); 32 a.isEmptyObject(f) || 33 setTimeout(function () { 34 a("#fake-complete").val(f[0].label); 35 }, 500); 36 } 37 }) 38 .fail(function (a, b, c) { 39 console.log("fail msg: " + c); 40 }); 41 }), 42 $('#s').keyup(function (e) { // enter 43 if (e.keyCode === 13) { 44 $('#fake-complete').val('') 45 $('form#searchform').submit() 46 } 47 }), 48 a("#s").keydown(function (b) { 49 (9 !== b.keyCode && 39 !== b.keyCode) || (b.preventDefault(), a(this).val(a("#fake-complete").val())); 50 }); 51 }); 52})(jQuery);
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.