PageSourceSearch

https://netdania.com/JSComponents/News/Controls/news-user-control.min.js?v=1.3.1

js netdania.com collected 2026-10-02 05:44:22 UTC 4,129 bytes, 1 lines download raw bytes

1window.NetDania=window.NetDania||{};NetDania.NewsComponent=NetDania.NewsComponent||{};NetDania.NewsComponent.Controls=(function(a){a.NewsUserControl=function(b){this.config=b;var c={pollingInterval:NetDania.General.Config.PollingInterval,host:NetDania.General.Config.Host,failoverHosts:NetDania.General.Config.FailoverHosts,behavior:NetDania.General.Config.Behavior,appId:"jsQuoteList v2.0"};this.connection=new NetDania.JsApi.JSONConnection(c);this.connection.Connect();this._requestIds=[];this._request={};this._requestInfo=[];this._request.data=[];this._request.tempnews={};this._request.headlines=4;this.requestNews()};a.NewsUserControl.prototype.formatNewsData=function(e){var g=e.data;var b=e.id;var n=[];var l,p;var k=null;for(var m=g.length-1;m>=0;m--){k=null;l=g[m];var d=this.getRequestData(b);try{k=JSON.parse(l.h)}catch(j){}finally{}var h=d.alias;if(d.alias==undefined){var f;var o={source:d.source,provider:d.provider};h=NetDania.News.Utilities.getAlias(o)}if(k===null){p={data:{id:m,t:l.t,s:l.s,i:l.i,h:l.h,source:d.source,provider:d.provider,fullSource:d.fullSource,alias:h}}}else{var i="";if(k.f19!==undefined&&k.f13!==undefined){var c=new Date(k.f15);i='<a href="'+k.f19+'" target="_blank">'+NetDania.Util.dateFormat(c,"dd.mm.yyyy")+" - "+k.f13+(k.f14?" - "+k.f14:"")+(k.f20?"<br/>"+k.f20:"")+"</a>"}else{i=l.h.replace('"',"")}p={data:{id:m,t:l.t,s:l.s,i:l.i,h:i,source:d.source,provider:d.provider,alias:h}}}n.push(p.data)}return n};a.NewsUserControl.prototype.getRequestData=function(c){for(var b=0;b<this._requestInfo.length;b++){if(this._requestInfo[b].id==c){return this._requestInfo[b]}}return{}};a.NewsUserControl.prototype.requestNews=function(){var b=this;for(var c=0;c<this.config.source.length;c++){var d=NetDania.JsApi.Request.getReqObjHeadlines(this.config.source[c].Source,this.config.maxHeadlines,this.config.source[c].Provider,this.config.isMonitor);this.connection.AddRequest(d);this._requestIds.push(d.i);this._request.data.push(d.i);this._requestInfo.push({id:d.i,source:this.config.source[c].Source,provider:this.config.source[c].Provider,type:"HEADLINE"})}this.connection.Flush();this.connection.addListener(NetDania.JsApi.Events.ONHISTORICALHEADLINES,function(g){try{if(NetDania.Util.isInArray(g.id,b._requestIds)){b._requestIds=$.grep(b._requestIds,function(i){return i!=g.id});var f=[];var e=b.getRequestData(g.id);if(g.data!==null){f=b.formatNewsData(g)}b.NewsDataUpdate({news:f,requestID:e.id,type:e.type})}}catch(h){NetDania.Util.LogError("NetDania.NewsComponent.Controls.NewsUserControl.Events.ONHISTORICALHEADLINES",h)}})};a.NewsUserControl.prototype.filterData=function(c){var b=c.headlines;if(c.tempnews.news!=null&&c.tempnews.news!=undefined){c.tempnews.news=c.tempnews.news.sort(function(e,d){var f=e.t;var g=d.t;return g-f});c.tempnews.news=c.tempnews.news.slice(0,b)}return c.tempnews};a.NewsUserControl.prototype.NewsDataUpdate=function(c){var b=this;try{if(c.type=="HEADLINE"||c.type=="SEARCH"){var e=false;if(this._request.data!=null&&this._request.data!=undefined&&this._request.data.length>0){$.each(this._request.data,function(f){if(b._request.data[f]==c.requestID){if($.isEmptyObject(b._request.tempnews)){b._request.tempnews=c}else{b._request.tempnews.news=b._request.tempnews.news.concat(c.news)}b._request.data.splice(f,1);return false}});if(this._request.data.length==0){e=true}if(e){this.NewsDataReceived(this.filterData(this._request))}}}else{this.NewsDataReceived(c)}}catch(d){NetDania.Util.LogError("NetDania.News.Monitor.NewsDataUpdate",d)}};a.NewsUserControl.prototype.UpdateNews=function(d,b){var e=d[b];if(e!==null&&e!==undefined&&this.config!==null){var c=NetDania.Util.GetElementByAttributeValue("data-id",this.config.guid+"-nuc-recid-hl");c.innerHTML='<a href="">'+e.h+"</a>"}};a.NewsUserControl.prototype.NewsDataReceived=function(d){try{if(d!==null&&d!==undefined){var b=d.news;if(b!==null&&b!==undefined){if(this.config!==null&&this.config.index!==undefined){this.UpdateNews(b,this.config.index)}}}}catch(c){NetDania.Util.LogError("NetDania.NewsComponent.Controls.NewsUserControl .NewsDataReceived",c)}};return a}(NetDania.NewsComponent.Controls||{}));

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.