PageSourceSearch

https://www.valentum.de/static/js/contentloader.js?v=103

js valentum.de collected 2026-10-08 11:55:39 UTC 3,130 bytes, 61 lines download raw bytes

1function is_in(str,arr){for(var x=0;x<arr.length;x++){if(arr[x]==str)return x;}
2return undefined;}
3function ContentLoader(u,p,m){var effects={};
4var callback=undefined;
5var contextObj;
6var loadingBars=new Array();
7this.form;
8this.url=u;
9this.params=p;
10this.httpMethod=m;
11if(this.httpMethod==undefined){this.httpMethod='GET';}
12this.addEffects=function(elem,eff){effects[elem]=eff;
13$(elem).css("_zoom","1");
14return this;};
15this.action=function(){var loaderObj=this;
16for(var elemClass in effects){$(elemClass).each(function(){loaderObj._loadingBar($(this),elemClass);
17});}
18this._loadContent();
19return this;};
20this.setContext=function(contextObj){this.contextObj=contextObj;}
21this.callback=function(c){callback=c;};
22this._loadingBar=function(elem,elemClass){var offsetLeft=elem.get(0).offsetLeft;
23var offsetTop=elem.get(0).offsetTop;
24var elemWidth=elem.width();
25var elemHeight=elem.height();
26var cssLeft=$(elem).get(0).left||0;
27if(is_in('loadingBar',effects[elemClass])!=undefined){if(elemHeight<20)elemHeight=20;
28$('<div class="loading-bar" style="position:absolute; width:'+elemWidth+'px; height:'+elemHeight+'px; top: '+offsetTop+'px; left: '+offsetLeft+'px"><a name="scrollTo"></a></div>').insertAfter(elem).each(function(){loadingBars.push(this);});
29if(is_in('scrollTo',effects[elemClass])!=undefined){document.location.href="#scrollTo";}}};
30this._loadContent=function(){var loaderObj=this;
31for(i in loaderObj.params){if(loaderObj.params[i]==undefined){delete loaderObj.params[i];}}$.ajax({type:loaderObj.httpMethod.toUpperCase(),
32url:loaderObj.url,
33data:loaderObj.params,
34success:function(d){d=$.trim(d);
35if(d.substring(0,8)=="--JSON--"){d=d.substring(8);
36var data=eval('('+d+')');
37loaderObj._insertContent(data);
38loaderObj._doJs(data['after']);
39if(callback!=undefined){callback(loaderObj._doJs(data['callback']));}
40for(i in loadingBars){$(loadingBars[i]).remove();}
41$(document).trigger("ajax_done",[loaderObj]);}
42else{document.open();
43document.write(d);
44document.close();}}});};
45this._insertContent=function(data){for(var elemClass in data['data']){var elemIdentifier;
46if(this.contextObj){elemIdentifier=new Array(elemClass,this.contextObj);}
47else{elemIdentifier=new Array(elemClass);}
48if(data['data'][elemClass]!=undefined)$.apply(this,elemIdentifier).each(function(){$(this).html(data['data'][elemClass]);
49$(this).trigger("ajax_changed");
50});}
51if(data.field_errors!=undefined){for(var fieldName in data.field_errors){ContentLoader.fieldErrorCallback(this.form,fieldName,data.field_errors[fieldName].err_id,data.field_errors[fieldName].err_string);}}if(data.status!=undefined){ContentLoader.statusCallback(this.form,data.status);}
52if(data.info!=undefined){ContentLoader.infoCallback(data.info[0],data.info[1],function(){eval(data.info[2]);});}
53if(data.error!=undefined){ContentLoader.errorCallback(data.error[0],data.error[1],function(){eval(data.error[2]);});}};
54this._doJs=function(js){var result;
55if(js!=undefined)result=eval(js);
56return result;};
57}
58ContentLoader.errorCallback=function(){};
59ContentLoader.infoCallback=function(){};
60ContentLoader.statusCallback=function(){};
61ContentLoader.fieldErrorCallback=function(){};

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.