PageSourceSearch

https://wios.szczecin.pl/js/search_j_16002.js

js wios.szczecin.pl collected 2026-10-02 17:31:25 UTC 2,340 bytes, 87 lines download raw bytes

1
2function htmlDecode(str) {
3   var entMap={'quot':34,'amp':38,'apos':39,'lt':60,'gt':62};
4   return str.replace(/&([^;]+);/g,function(m,n) {
5      var code;
6      if (n.substr(0,1)=='#') {
7         if (n.substr(1,1)=='x') {
8            code=parseInt(n.substr(2),16);
9         } else {
10            code=parseInt(n.substr(1),10);
11         }
12      } else {
13         code=entMap[n];
14      }
15      return (code===undefined||code===NaN)?'&'+n+';':String.fromCharCode(code);
16   });
17};
18
19function szukaj_16002(afr) {
20   jQuery("#szukaj_result_16002").hide();
21   jQuery.getJSON("search_j_16002.asp?target="+encodeURI(jQuery("#szukaj_input_16002").val())+"&fr="+afr+"&rv="+Math.random(),
22      function(json){
23         var w=0;
24         var atext='';
25         if (json.status=="OK") {
26            jQuery.each(json.items,
27               function(i,aitem) {
28                  aitem.abstract=htmlDecode(aitem.abstract);
29                  var soid="";
30                  l=aitem.href.split(".")[0].split("_");
31                  if (l.length==3) {
32                     soid="?soid="+l[2].toUpperCase();
33                  }
34                  if (soid=="") {
35                     soid=soid+"?";
36                  } else {
37                     soid=soid+"&";
38                  }
39                  soid=soid+"target="+jQuery("#szukaj_input_16002").val();
40                  aitem.url='chapter_'+l[1]+'.asp'+soid;
41               }
42            );
43            vue_searchapp_16002.result=json;
44            jQuery("#szukaj_result_16002").show();
45         } else if (json.status=="INFO") {
46            alert(htmlDecode(json.info));
47         } else if (json.status=="BAD") {
48            alert(htmlDecode(json.info));
49         } else {
50            alert(json.status);
51         }
52      }
53   );
54}
55
56var vue_searchapp_16002;
57
58jQuery(function() {
59   jQuery("#szukaj_input_16002").keydown(
60      function(event) {
61         if (event.keyCode==13) {
62            szukaj_16002('');
63            return false;
64         }
65      }
66   )
67   jQuery("#szukaj_button_16002").click(
68      function() {
69         szukaj_16002('');
70         return false;
71      }
72   )
73   
74   vue_searchapp_16002 = new Vue({
75     el: '#szukaj_result_16002',
76     data: {
77       result: {}
78     },
79     methods: {
80       doSearch: function (value) {
81         szukaj_16002(value)
82       }
83     }
84   });
85
86});
87

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.