This file is indexed.

/usr/share/javascript/jquery-countdown/jquery.countdown.min.js is in libjs-jquery-countdown 10-2ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
(function(g){function b(){this.regional=[];this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,timeSeparator:":",isRTL:false};this._defaults={until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:false,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1};g.extend(this._defaults,this.regional[""]);this._serverSyncs=[];function m(o){var p=(o||new Date().getTime());if(p-l>=1000){g.countdown._updateTargets();l=p}n(m)}var n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var l=0;if(!n){setInterval(function(){g.countdown._updateTargets()},980)}else{l=window.mozAnimationStartTime||new Date().getTime();n(m)}}var j="countdown";var c=0;var h=1;var d=2;var a=3;var k=4;var i=5;var f=6;g.extend(b.prototype,{markerClassName:"hasCountdown",_timerTargets:[],setDefaults:function(l){this._resetExtraLabels(this._defaults,l);e(this._defaults,l||{})},UTCDate:function(n,r,p,s,t,m,o,l){if(typeof r=="object"&&r.constructor==Date){l=r.getMilliseconds();o=r.getSeconds();m=r.getMinutes();t=r.getHours();s=r.getDate();p=r.getMonth();r=r.getFullYear()}var q=new Date();q.setUTCFullYear(r);q.setUTCDate(1);q.setUTCMonth(p||0);q.setUTCDate(s||1);q.setUTCHours(t||0);q.setUTCMinutes((m||0)-(Math.abs(n)<30?n*60:n));q.setUTCSeconds(o||0);q.setUTCMilliseconds(l||0);return q},periodsToSeconds:function(l){return l[0]*31557600+l[1]*2629800+l[2]*604800+l[3]*86400+l[4]*3600+l[5]*60+l[6]},_settingsCountdown:function(n,l){if(!l){return g.countdown._defaults}var m=g.data(n,j);return(l=="all"?m.options:m.options[l])},_attachCountdown:function(o,m){var l=g(o);if(l.hasClass(this.markerClassName)){return}l.addClass(this.markerClassName);var n={options:g.extend({},m),_periods:[0,0,0,0,0,0,0]};g.data(o,j,n);this._changeCountdown(o)},_addTarget:function(l){if(!this._hasTarget(l)){this._timerTargets.push(l)}},_hasTarget:function(l){return(g.inArray(l,this._timerTargets)>-1)},_removeTarget:function(l){this._timerTargets=g.map(this._timerTargets,function(m){return(m==l?null:m)})},_updateTargets:function(){for(var l=this._timerTargets.length-1;l>=0;l--){this._updateCountdown(this._timerTargets[l])}},_updateCountdown:function(r,p){var n=g(r);p=p||g.data(r,j);if(!p){return}n.html(this._generateHTML(p));n[(this._get(p,"isRTL")?"add":"remove")+"Class"]("countdown_rtl");var o=this._get(p,"onTick");if(o){var s=p._hold!="lap"?p._periods:this._calculatePeriods(p,p._show,this._get(p,"significant"),new Date());var l=this._get(p,"tickInterval");if(l==1||this.periodsToSeconds(s)%l==0){o.apply(r,[s])}}var t=p._hold!="pause"&&(p._since?p._now.getTime()<p._since.getTime():p._now.getTime()>=p._until.getTime());if(t&&!p._expiring){p._expiring=true;if(this._hasTarget(r)||this._get(p,"alwaysExpire")){this._removeTarget(r);var m=this._get(p,"onExpiry");if(m){m.apply(r,[])}var v=this._get(p,"expiryText");if(v){var q=this._get(p,"layout");p.options.layout=v;this._updateCountdown(r,p);p.options.layout=q}var u=this._get(p,"expiryUrl");if(u){window.location=u}}p._expiring=false}else{if(p._hold=="pause"){this._removeTarget(r)}}g.data(r,j,p)},_changeCountdown:function(q,n,p){n=n||{};if(typeof n=="string"){var m=n;n={};n[m]=p}var o=g.data(q,j);if(o){this._resetExtraLabels(o.options,n);e(o.options,n);this._adjustSettings(q,o);g.data(q,j,o);var l=new Date();if((o._since&&o._since<l)||(o._until&&o._until>l)){this._addTarget(q)}this._updateCountdown(q,o)}},_resetExtraLabels:function(o,l){var m=false;for(var p in l){if(p!="whichLabels"&&p.match(/[Ll]abels/)){m=true;break}}if(m){for(var p in o){if(p.match(/[Ll]abels[0-9]/)){o[p]=null}}}},_adjustSettings:function(r,p){var m;var s=this._get(p,"serverSync");var o=0;var t=null;for(var n=0;n<this._serverSyncs.length;n++){if(this._serverSyncs[n][0]==s){t=this._serverSyncs[n][1];break}}if(t!=null){o=(s?t:0);m=new Date()}else{var l=(s?s.apply(r,[]):null);m=new Date();o=(l?m.getTime()-l.getTime():0);this._serverSyncs.push([s,o])}var q=this._get(p,"timezone");q=(q==null?-m.getTimezoneOffset():q);p._since=this._get(p,"since");if(p._since!=null){p._since=this.UTCDate(q,this._determineTime(p._since,null));if(p._since&&o){p._since.setMilliseconds(p._since.getMilliseconds()+o)}}p._until=this.UTCDate(q,this._determineTime(this._get(p,"until"),m));if(o){p._until.setMilliseconds(p._until.getMilliseconds()+o)}p._show=this._determineShow(p)},_destroyCountdown:function(m){var l=g(m);if(!l.hasClass(this.markerClassName)){return}this._removeTarget(m);l.removeClass(this.markerClassName).empty();g.removeData(m,j)},_pauseCountdown:function(l){this._hold(l,"pause")},_lapCountdown:function(l){this._hold(l,"lap")},_resumeCountdown:function(l){this._hold(l,null)},_hold:function(o,n){var m=g.data(o,j);if(m){if(m._hold=="pause"&&!n){m._periods=m._savePeriods;var l=(m._since?"-":"+");m[m._since?"_since":"_until"]=this._determineTime(l+m._periods[0]+"y"+l+m._periods[1]+"o"+l+m._periods[2]+"w"+l+m._periods[3]+"d"+l+m._periods[4]+"h"+l+m._periods[5]+"m"+l+m._periods[6]+"s");this._addTarget(o)}m._hold=n;m._savePeriods=(n=="pause"?m._periods:null);g.data(o,j,m);this._updateCountdown(o,m)}},_getTimesCountdown:function(m){var l=g.data(m,j);return(!l?null:(!l._hold?l._periods:this._calculatePeriods(l,l._show,this._get(l,"significant"),new Date())))},_get:function(m,l){return(m.options[l]!=null?m.options[l]:g.countdown._defaults[l])},_determineTime:function(o,l){var n=function(r){var q=new Date();q.setTime(q.getTime()+r*1000);return q};var m=function(u){u=u.toLowerCase();var r=new Date();var y=r.getFullYear();var w=r.getMonth();var z=r.getDate();var t=r.getHours();var s=r.getMinutes();var q=r.getSeconds();var x=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var v=x.exec(u);while(v){switch(v[2]||"s"){case"s":q+=parseInt(v[1],10);break;case"m":s+=parseInt(v[1],10);break;case"h":t+=parseInt(v[1],10);break;case"d":z+=parseInt(v[1],10);break;case"w":z+=parseInt(v[1],10)*7;break;case"o":w+=parseInt(v[1],10);z=Math.min(z,g.countdown._getDaysInMonth(y,w));break;case"y":y+=parseInt(v[1],10);z=Math.min(z,g.countdown._getDaysInMonth(y,w));break}v=x.exec(u)}return new Date(y,w,z,t,s,q,0)};var p=(o==null?l:(typeof o=="string"?m(o):(typeof o=="number"?n(o):o)));if(p){p.setMilliseconds(0)}return p},_getDaysInMonth:function(l,m){return 32-new Date(l,m,32).getDate()},_normalLabels:function(l){return l},_generateHTML:function(p){var A=this._get(p,"significant");p._periods=(p._hold?p._periods:this._calculatePeriods(p,p._show,A,new Date()));var v=false;var m=0;var o=A;var x=g.extend({},p._show);for(var u=c;u<=f;u++){v|=(p._show[u]=="?"&&p._periods[u]>0);x[u]=(p._show[u]=="?"&&!v?null:p._show[u]);m+=(x[u]?1:0);o-=(p._periods[u]>0?1:0)}var w=[false,false,false,false,false,false,false];for(var u=f;u>=c;u--){if(p._show[u]){if(p._periods[u]){w[u]=true}else{w[u]=o>0;o--}}}var t=this._get(p,"compact");var r=this._get(p,"layout");var q=(t?this._get(p,"compactLabels"):this._get(p,"labels"));var l=this._get(p,"whichLabels")||this._normalLabels;var z=this._get(p,"timeSeparator");var y=this._get(p,"description")||"";var s=function(C){var B=g.countdown._get(p,"compactLabels"+l(p._periods[C]));return(x[C]?p._periods[C]+(B?B[C]:q[C])+" ":"")};var n=function(C){var B=g.countdown._get(p,"labels"+l(p._periods[C]));return((!A&&x[C])||(A&&w[C])?'<span class="countdown_section"><span class="countdown_amount">'+p._periods[C]+"</span><br/>"+(B?B[C]:q[C])+"</span>":"")};return(r?this._buildLayout(p,x,r,t,A,w):((t?'<span class="countdown_row countdown_amount'+(p._hold?" countdown_holding":"")+'">'+s(c)+s(h)+s(d)+s(a)+(x[k]?this._minDigits(p._periods[k],2):"")+(x[i]?(x[k]?z:"")+this._minDigits(p._periods[i],2):"")+(x[f]?(x[k]||x[i]?z:"")+this._minDigits(p._periods[f],2):""):'<span class="countdown_row countdown_show'+(A||m)+(p._hold?" countdown_holding":"")+'">'+n(c)+n(h)+n(d)+n(a)+n(k)+n(i)+n(f))+"</span>"+(y?'<span class="countdown_row countdown_descr">'+y+"</span>":"")))},_buildLayout:function(q,x,s,u,y,w){var r=this._get(q,(u?"compactLabels":"labels"));var m=this._get(q,"whichLabels")||this._normalLabels;var l=function(A){return(g.countdown._get(q,(u?"compactLabels":"labels")+m(q._periods[A]))||r)[A]};var v=function(B,A){return Math.floor(B/A)%10};var n={desc:this._get(q,"description"),sep:this._get(q,"timeSeparator"),yl:l(c),yn:q._periods[c],ynn:this._minDigits(q._periods[c],2),ynnn:this._minDigits(q._periods[c],3),y1:v(q._periods[c],1),y10:v(q._periods[c],10),y100:v(q._periods[c],100),y1000:v(q._periods[c],1000),ol:l(h),on:q._periods[h],onn:this._minDigits(q._periods[h],2),onnn:this._minDigits(q._periods[h],3),o1:v(q._periods[h],1),o10:v(q._periods[h],10),o100:v(q._periods[h],100),o1000:v(q._periods[h],1000),wl:l(d),wn:q._periods[d],wnn:this._minDigits(q._periods[d],2),wnnn:this._minDigits(q._periods[d],3),w1:v(q._periods[d],1),w10:v(q._periods[d],10),w100:v(q._periods[d],100),w1000:v(q._periods[d],1000),dl:l(a),dn:q._periods[a],dnn:this._minDigits(q._periods[a],2),dnnn:this._minDigits(q._periods[a],3),d1:v(q._periods[a],1),d10:v(q._periods[a],10),d100:v(q._periods[a],100),d1000:v(q._periods[a],1000),hl:l(k),hn:q._periods[k],hnn:this._minDigits(q._periods[k],2),hnnn:this._minDigits(q._periods[k],3),h1:v(q._periods[k],1),h10:v(q._periods[k],10),h100:v(q._periods[k],100),h1000:v(q._periods[k],1000),ml:l(i),mn:q._periods[i],mnn:this._minDigits(q._periods[i],2),mnnn:this._minDigits(q._periods[i],3),m1:v(q._periods[i],1),m10:v(q._periods[i],10),m100:v(q._periods[i],100),m1000:v(q._periods[i],1000),sl:l(f),sn:q._periods[f],snn:this._minDigits(q._periods[f],2),snnn:this._minDigits(q._periods[f],3),s1:v(q._periods[f],1),s10:v(q._periods[f],10),s100:v(q._periods[f],100),s1000:v(q._periods[f],1000)};var p=s;for(var o=c;o<=f;o++){var t="yowdhms".charAt(o);var z=new RegExp("\\{"+t+"<\\}(.*)\\{"+t+">\\}","g");p=p.replace(z,((!y&&x[o])||(y&&w[o])?"$1":""))}g.each(n,function(C,A){var B=new RegExp("\\{"+C+"\\}","g");p=p.replace(B,A)});return p},_minDigits:function(m,l){m=""+m;if(m.length>=l){return m}m="0000000000"+m;return m.substr(m.length-l)},_determineShow:function(m){var n=this._get(m,"format");var l=[];l[c]=(n.match("y")?"?":(n.match("Y")?"!":null));l[h]=(n.match("o")?"?":(n.match("O")?"!":null));l[d]=(n.match("w")?"?":(n.match("W")?"!":null));l[a]=(n.match("d")?"?":(n.match("D")?"!":null));l[k]=(n.match("h")?"?":(n.match("H")?"!":null));l[i]=(n.match("m")?"?":(n.match("M")?"!":null));l[f]=(n.match("s")?"?":(n.match("S")?"!":null));return l},_calculatePeriods:function(o,C,s,m){o._now=m;o._now.setMilliseconds(0);var q=new Date(o._now.getTime());if(o._since){if(m.getTime()<o._since.getTime()){o._now=m=q}else{m=o._since}}else{q.setTime(o._until.getTime());if(m.getTime()>o._until.getTime()){o._now=m=q}}var l=[0,0,0,0,0,0,0];if(C[c]||C[h]){var x=g.countdown._getDaysInMonth(m.getFullYear(),m.getMonth());var y=g.countdown._getDaysInMonth(q.getFullYear(),q.getMonth());var r=(q.getDate()==m.getDate()||(q.getDate()>=Math.min(x,y)&&m.getDate()>=Math.min(x,y)));var B=function(E){return(E.getHours()*60+E.getMinutes())*60+E.getSeconds()};var t=Math.max(0,(q.getFullYear()-m.getFullYear())*12+q.getMonth()-m.getMonth()+((q.getDate()<m.getDate()&&!r)||(r&&B(q)<B(m))?-1:0));l[c]=(C[c]?Math.floor(t/12):0);l[h]=(C[h]?t-l[c]*12:0);m=new Date(m.getTime());var D=(m.getDate()==x);var p=g.countdown._getDaysInMonth(m.getFullYear()+l[c],m.getMonth()+l[h]);if(m.getDate()>p){m.setDate(p)}m.setFullYear(m.getFullYear()+l[c]);m.setMonth(m.getMonth()+l[h]);if(D){m.setDate(p)}}var w=Math.floor((q.getTime()-m.getTime())/1000);var n=function(F,E){l[F]=(C[F]?Math.floor(w/E):0);w-=l[F]*E};n(d,604800);n(a,86400);n(k,3600);n(i,60);n(f,1);if(w>0&&!o._since){var u=[1,12,4.3482,7,24,60,60];var v=f;var z=1;for(var A=f;A>=c;A--){if(C[A]){if(l[v]>=z){l[v]=0;w=1}if(w>0){l[A]++;w=0;v=A;z=1}}z*=u[A]}}if(s){for(var A=c;A<=f;A++){if(s&&l[A]){s--}else{if(!s){l[A]=0}}}}return l}});function e(n,m){g.extend(n,m);for(var l in m){if(m[l]==null){n[l]=null}}return n}g.fn.countdown=function(m){var l=Array.prototype.slice.call(arguments,1);if(m=="getTimes"||m=="settings"){return g.countdown["_"+m+"Countdown"].apply(g.countdown,[this[0]].concat(l))}return this.each(function(){if(typeof m=="string"){g.countdown["_"+m+"Countdown"].apply(g.countdown,[this].concat(l))}else{g.countdown._attachCountdown(this,m)}})};g.countdown=new b()})(jQuery);