PageSourceSearch

https://www.bildhau.de/modules/appagebuilder/views/js/countdown.js?v=bce1cd28

js bildhau.de collected 2026-10-02 21:34:49 UTC 2,366 bytes, 74 lines download raw bytes

1/**
2 * @copyright Commercial License By LeoTheme.Com 
3 * @email leotheme.com
4 * @visit http://www.leotheme.com
5 */
6
7(function(){
8	$.fn.lofCountDown = function( options ) {
9	 	return this.each(function() { 
10			// get instance of the lofCountDown.
11			new  $.lofCountDown( this, options ); 
12		});
13 	 }
14	$.lofCountDown = function( obj, options ){
15		
16		this.options = $.extend({
17				autoStart			: true,
18				LeadingZero:true,
19				DisplayFormat:"<div>%%D%% Days</div><div>%%H%% Hours</div><div>%%M%% Minutes</div><div>%%S%% Seconds</div>",
20				FinishMessage:"Expired",
21				CountActive:true,
22				TargetDate:null
23		}, options || {} );
24		if( this.options.TargetDate == null || this.options.TargetDate == '' ){
25			return ;
26		}
27		this.timer  = null;
28		this.element = obj;
29		this.CountStepper = -1;
30		this.CountStepper = Math.ceil(this.CountStepper);
31		this.SetTimeOutPeriod = (Math.abs(this.CountStepper)-1)*1000 + 990;
32		var dthen = new Date(this.options.TargetDate);
33		var dnow = new Date();
34		if( this.CountStepper > 0 ) {
35			ddiff = new Date(dnow-dthen);
36		}
37		else {
38			 ddiff = new Date(dthen-dnow);
39		}
40		gsecs = Math.floor(ddiff.valueOf()/1000); 
41		this.CountBack(gsecs, this);
42
43	};
44	 $.lofCountDown.fn =  $.lofCountDown.prototype;
45     $.lofCountDown.fn.extend =  $.lofCountDown.extend = $.extend;
46	 $.lofCountDown.fn.extend({
47		calculateDate:function( secs, num1, num2 ){
48			  var s = ((Math.floor(secs/num1))%num2).toString();
49			  if ( this.options.LeadingZero && s.length < 2) {
50					s = "0" + s;
51			  }
52			  return "<b>" + s + "</b>";
53		},
54		CountBack:function( secs, self ){
55			 if (secs < 0) {
56				// self.element.innerHTML = '<div class="lof-labelexpired"> '+self.options.FinishMessage+"</div>";
57				return;
58			  }
59			  clearInterval(self.timer);
60			  DisplayStr = self.options.DisplayFormat.replace(/%%D%%/g, self.calculateDate( secs,86400,100000) );
61			  DisplayStr = DisplayStr.replace(/%%H%%/g, self.calculateDate(secs,3600,24));
62			  DisplayStr = DisplayStr.replace(/%%M%%/g, self.calculateDate(secs,60,60));
63			  DisplayStr = DisplayStr.replace(/%%S%%/g, self.calculateDate(secs,1,60));
64			  self.element.innerHTML = DisplayStr;
65			  if (self.options.CountActive) {
66				   self.timer = null;
67				 self.timer =  setTimeout( function(){
68					self.CountBack((secs+self.CountStepper),self);			
69				},( self.SetTimeOutPeriod ) );
70			 }
71		}
72					
73	})
74})(jQuery)

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.