PageSourceSearch

https://www.reso.co/js/taglib/section.js?version=1790319560

js reso.co collected 2026-09-26 02:16:45 UTC 2,541 bytes, 114 lines download raw bytes

1Section = function(options)
2{
3	this.id = options.id;
4	this.webroot = options.webroot;
5    this.notag = options.notag;
6    this.replace_notag = options.replace_notag;
7	this.urlparams = options.urlparams;
8
9    this.update=Section_update;
10    this.show=Section_show;
11	this.hide=Section_hide;
12	this.elem=document.getElementById(this.id);
13	this.setURL=Section_setURL;
14	this.setURLParams=Section_setURLParams;
15	this.setContent=Section_setContent;
16	this.appendContent=Section_appendContent;
17	this.isVisible=Section_isVisible;
18	this.getElement=Section_getElement;
19	this.getTemplate=Section_getTemplate;
20	this.setTemplate=Section_setTemplate;
21	this.request = new TaglibRequest(options.url,this.urlparams,'',Section_defaultSuccessHandler,null, 'POST');
22	this.request.callback.section=this;
23	this.dispatchResponse=Section_DispatchResponse;
24};
25
26Section_getTemplate=function()
27{
28    return this.url;
29};
30
31Section_setTemplate=function(template)
32{
33    this.setURL(template);
34};
35
36Section_getElement=function()
37{
38	return this.elem;
39};
40
41Section_setContent=function(str)
42{
43    if (this.notag && this.replace_notag) {
44//        if the notag option is true but the this.elem is not null (dom element exists)
45//        then it is replace with the content
46        if (this.elem != null) {
47            jQuery(this.elem).replaceWith(str);
48        }
49    } else {
50        AfDispatcher.process(this.id, str);
51    }
52};
53
54Section_appendContent=function(str)
55{
56	var current_content = this.getElement().innerHTML;
57	AfDispatcher.process(this.id, current_content + str);
58};
59
60Section_setURLParams=function(urlparams)
61{	
62	this.request.setStaticParams(urlparams)
63};
64
65Section_defaultSuccessHandler=function(o)
66{
67	var response={};
68	eval('response='+o.responseText+';');
69	if(response===null)
70	{
71		response={'exception':o.responseText};
72	}
73	this.section.dispatchResponse(response,this.section.id);
74};
75
76Section_DispatchResponse=function(response,secid)
77{
78    var rpart = null;
79	if(typeof(response['exception'])!=='undefined')
80	{
81        rpart=response.exception;
82		
83	}
84	else
85	{
86		rpart=response[secid]
87	}	
88	getCustomTag(secid).setContent(rpart);
89};
90
91Section_update=function()
92{
93	this.request.send();
94};
95
96Section_show=function()
97{
98	this.elem.style.display='block';
99};
100
101Section_hide=function()
102{
103	this.elem.style.display='none';
104};
105
106Section_setURL=function(url)
107{
108    this.request.setUrl(url);
109};
110
111Section_isVisible=function()
112{
113	return this.elem.style.display!='none';
114};

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.