Version Description
- updated CSS to deal with omit-weeks and trip dash issues
- now calculates any offset between server and browser times for countdown calculations
- added circle style
Download this release
Release Info
Developer | baden03 |
Plugin | T(-) Countdown |
Version | 2.3.19 |
Comparing to | |
See all releases |
Code changes from version 2.3.18 to 2.3.19
- countdown-timer.php +3 -3
- css/c-3po-mini/style.css +15 -7
- css/c-3po/style.css +16 -9
- css/carbonite/style.css +2 -2
- css/carbonlite/style.css +6 -6
- css/circle/style.css +27 -0
- css/cloud-city/style.css +9 -7
- css/sith/style.css +29 -17
- js/jquery.t-countdown.js +12 -6
- readme.txt +11 -7
countdown-timer.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: T(-) Countdown
|
|
4 |
Text Domain: jquery-t-countdown-widget
|
5 |
Plugin URI: https://plugins.twinpictures.de/plugins/t-minus-countdown/
|
6 |
Description: Display and configure multiple T(-) Countdown timers using a shortcode or sidebar widget.
|
7 |
-
Version: 2.3.
|
8 |
Author: twinpictures, baden03
|
9 |
Author URI: https://www.twinpictures.de/
|
10 |
License: GPL2
|
@@ -12,7 +12,7 @@ License: GPL2
|
|
12 |
|
13 |
class WP_TMinusCD {
|
14 |
var $plugin_name = 'T(-) Countdown';
|
15 |
-
var $version = '2.3.
|
16 |
var $domain = 'tminus';
|
17 |
var $plguin_options_page_title = 'T(-) Countdown Options';
|
18 |
var $plugin_options_menue_title = 'T(-) Countdown';
|
@@ -135,7 +135,7 @@ class WP_TMinusCD {
|
|
135 |
$plugin_url = plugins_url() .'/'. dirname( plugin_basename(__FILE__) );
|
136 |
|
137 |
//lwtCountdown script
|
138 |
-
wp_register_script('countdown-script', $plugin_url.'/js/jquery.t-countdown.js', array ('jquery'), '
|
139 |
wp_enqueue_script('countdown-script');
|
140 |
|
141 |
//force load styles
|
4 |
Text Domain: jquery-t-countdown-widget
|
5 |
Plugin URI: https://plugins.twinpictures.de/plugins/t-minus-countdown/
|
6 |
Description: Display and configure multiple T(-) Countdown timers using a shortcode or sidebar widget.
|
7 |
+
Version: 2.3.19
|
8 |
Author: twinpictures, baden03
|
9 |
Author URI: https://www.twinpictures.de/
|
10 |
License: GPL2
|
12 |
|
13 |
class WP_TMinusCD {
|
14 |
var $plugin_name = 'T(-) Countdown';
|
15 |
+
var $version = '2.3.19';
|
16 |
var $domain = 'tminus';
|
17 |
var $plguin_options_page_title = 'T(-) Countdown Options';
|
18 |
var $plugin_options_menue_title = 'T(-) Countdown';
|
135 |
$plugin_url = plugins_url() .'/'. dirname( plugin_basename(__FILE__) );
|
136 |
|
137 |
//lwtCountdown script
|
138 |
+
wp_register_script('countdown-script', $plugin_url.'/js/jquery.t-countdown.js', array ('jquery'), '2.4.0', 'true');
|
139 |
wp_enqueue_script('countdown-script');
|
140 |
|
141 |
//force load styles
|
css/c-3po-mini/style.css
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
/*above the dashboard*/
|
2 |
.c-3po-mini-tophtml, .c-3po-mini-bothtml {
|
3 |
margin: 0 auto;
|
@@ -8,11 +12,10 @@
|
|
8 |
|
9 |
/*above the dashboard*/
|
10 |
.c-3po-mini-dashboard {
|
11 |
-
|
12 |
-
|
13 |
margin: auto;
|
14 |
-
|
15 |
-
padding: 4px 2px 2px 0;
|
16 |
border-top: 1px solid #fcff95;
|
17 |
border-left: 1px solid #fcff95;
|
18 |
border-bottom: 1px solid #a37e39;
|
@@ -33,7 +36,7 @@
|
|
33 |
}
|
34 |
|
35 |
.c-3po-mini-dash {
|
36 |
-
width:
|
37 |
height: 15px;
|
38 |
float: left;
|
39 |
margin-left: 5px;
|
@@ -50,8 +53,13 @@
|
|
50 |
/*-webkit-box-shadow: 2px 2px 5px a37e39; -moz-box-shadow: 2px 2px 5px #a37e39;box-shadow: 2px 2px 5px #a37e39;*/
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
.c-3po-mini-tripdash {
|
54 |
-
width:
|
55 |
height: 15px;
|
56 |
float: left;
|
57 |
margin-left: 5px;
|
@@ -83,7 +91,7 @@
|
|
83 |
display: block;
|
84 |
position: absolute;
|
85 |
top: 14px;
|
86 |
-
width:
|
87 |
padding: 0;
|
88 |
color: #fcffc8;
|
89 |
text-align: left;
|
1 |
+
.tminus_countdown {
|
2 |
+
text-align: center;
|
3 |
+
}
|
4 |
+
|
5 |
/*above the dashboard*/
|
6 |
.c-3po-mini-tophtml, .c-3po-mini-bothtml {
|
7 |
margin: 0 auto;
|
12 |
|
13 |
/*above the dashboard*/
|
14 |
.c-3po-mini-dashboard {
|
15 |
+
display: inline-block;
|
16 |
+
height: 30px;
|
17 |
margin: auto;
|
18 |
+
padding: 4px;
|
|
|
19 |
border-top: 1px solid #fcff95;
|
20 |
border-left: 1px solid #fcff95;
|
21 |
border-bottom: 1px solid #a37e39;
|
36 |
}
|
37 |
|
38 |
.c-3po-mini-dash {
|
39 |
+
width: auto;
|
40 |
height: 15px;
|
41 |
float: left;
|
42 |
margin-left: 5px;
|
53 |
/*-webkit-box-shadow: 2px 2px 5px a37e39; -moz-box-shadow: 2px 2px 5px #a37e39;box-shadow: 2px 2px 5px #a37e39;*/
|
54 |
}
|
55 |
|
56 |
+
.c-3po-mini-dash:last-of-type {
|
57 |
+
margin-right: 5px;
|
58 |
+
padding-right: 2px;
|
59 |
+
}
|
60 |
+
|
61 |
.c-3po-mini-tripdash {
|
62 |
+
width: auto;
|
63 |
height: 15px;
|
64 |
float: left;
|
65 |
margin-left: 5px;
|
91 |
display: block;
|
92 |
position: absolute;
|
93 |
top: 14px;
|
94 |
+
width: auto;
|
95 |
padding: 0;
|
96 |
color: #fcffc8;
|
97 |
text-align: left;
|
css/c-3po/style.css
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
/*above the dashboard*/
|
|
|
|
|
|
|
2 |
.c-3po-tophtml, .c-3po-bothtml {
|
3 |
margin: 0 auto;
|
4 |
padding: 0;
|
@@ -8,11 +11,10 @@
|
|
8 |
|
9 |
/*above the dashboard*/
|
10 |
.c-3po-dashboard {
|
11 |
-
|
12 |
-
|
13 |
-
margin: auto;
|
14 |
-
|
15 |
-
padding: 6px 4px 4px 0;
|
16 |
border-top: 1px solid #fcff95;
|
17 |
border-left: 1px solid #fcff95;
|
18 |
border-bottom: 1px solid #a37e39;
|
@@ -33,7 +35,7 @@
|
|
33 |
}
|
34 |
|
35 |
.c-3po-dash {
|
36 |
-
width:
|
37 |
height: 23px;
|
38 |
float: left;
|
39 |
margin-left: 13px;
|
@@ -50,11 +52,16 @@
|
|
50 |
/*-webkit-box-shadow: 2px 2px 5px a37e39; -moz-box-shadow: 2px 2px 5px #a37e39;box-shadow: 2px 2px 5px #a37e39;*/
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
.c-3po-tripdash {
|
54 |
-
width:
|
55 |
height: 23px;
|
56 |
float: left;
|
57 |
-
margin-left:
|
58 |
padding-left: 3px;
|
59 |
margin-top: -2px;
|
60 |
position: relative;
|
@@ -84,7 +91,7 @@
|
|
84 |
position: absolute;
|
85 |
left: -4px;
|
86 |
top: 21px;
|
87 |
-
width:
|
88 |
padding: 0 3px;
|
89 |
color: #fcffc8;
|
90 |
text-align: center;
|
1 |
/*above the dashboard*/
|
2 |
+
.tminus_countdown {
|
3 |
+
text-align: center;
|
4 |
+
}
|
5 |
.c-3po-tophtml, .c-3po-bothtml {
|
6 |
margin: 0 auto;
|
7 |
padding: 0;
|
11 |
|
12 |
/*above the dashboard*/
|
13 |
.c-3po-dashboard {
|
14 |
+
display: inline-block;
|
15 |
+
height: 43px;
|
16 |
+
margin: 0 auto;
|
17 |
+
padding: 6px;
|
|
|
18 |
border-top: 1px solid #fcff95;
|
19 |
border-left: 1px solid #fcff95;
|
20 |
border-bottom: 1px solid #a37e39;
|
35 |
}
|
36 |
|
37 |
.c-3po-dash {
|
38 |
+
width: auto;
|
39 |
height: 23px;
|
40 |
float: left;
|
41 |
margin-left: 13px;
|
52 |
/*-webkit-box-shadow: 2px 2px 5px a37e39; -moz-box-shadow: 2px 2px 5px #a37e39;box-shadow: 2px 2px 5px #a37e39;*/
|
53 |
}
|
54 |
|
55 |
+
.c-3po-dash:last-of-type {
|
56 |
+
margin-right: 13px;
|
57 |
+
padding-right: 3px;
|
58 |
+
}
|
59 |
+
|
60 |
.c-3po-tripdash {
|
61 |
+
width: auto;
|
62 |
height: 23px;
|
63 |
float: left;
|
64 |
+
margin-left: 13px;
|
65 |
padding-left: 3px;
|
66 |
margin-top: -2px;
|
67 |
position: relative;
|
91 |
position: absolute;
|
92 |
left: -4px;
|
93 |
top: 21px;
|
94 |
+
width: auto;
|
95 |
padding: 0 3px;
|
96 |
color: #fcffc8;
|
97 |
text-align: center;
|
css/carbonite/style.css
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
}
|
27 |
|
28 |
.carbonite-tripdash {
|
29 |
-
width:
|
30 |
height: 44px;
|
31 |
float: left;
|
32 |
margin-left: 2px;
|
@@ -95,4 +95,4 @@
|
|
95 |
.carbonite-bothtml {
|
96 |
margin: 0;
|
97 |
padding: 0;
|
98 |
-
}
|
26 |
}
|
27 |
|
28 |
.carbonite-tripdash {
|
29 |
+
width: 64px;
|
30 |
height: 44px;
|
31 |
float: left;
|
32 |
margin-left: 2px;
|
95 |
.carbonite-bothtml {
|
96 |
margin: 0;
|
97 |
padding: 0;
|
98 |
+
}
|
css/carbonlite/style.css
CHANGED
@@ -6,18 +6,18 @@
|
|
6 |
|
7 |
/*above the dashboard*/
|
8 |
.carbonlite-dashboard {
|
9 |
-
height:
|
10 |
width: 250px;
|
11 |
margin: 0 auto;
|
12 |
padding-top: 10px;
|
13 |
-
padding-left: 10px;
|
14 |
background: transparent url('images/bg_countdown.png') 0 0 no-repeat;
|
|
|
15 |
}
|
16 |
|
17 |
.carbonlite-dash {
|
|
|
18 |
width: 42px;
|
19 |
height: 44px;
|
20 |
-
float: left;
|
21 |
margin-left: 2px;
|
22 |
padding-left: 2px;
|
23 |
padding-top: 10px;
|
@@ -26,9 +26,9 @@
|
|
26 |
}
|
27 |
|
28 |
.carbonlite-tripdash {
|
|
|
29 |
width: 62px;
|
30 |
height: 44px;
|
31 |
-
float: left;
|
32 |
margin-left: 2px;
|
33 |
padding-left: 2px;
|
34 |
padding-top: 10px;
|
@@ -43,7 +43,7 @@
|
|
43 |
.carbonlite-days_dash {
|
44 |
margin-left: 2px;
|
45 |
background: transparent url('images/bg_dash.png') 0 0 no-repeat;
|
46 |
-
|
47 |
}
|
48 |
|
49 |
.carbonlite-days_trip_dash {
|
@@ -93,4 +93,4 @@
|
|
93 |
.carbonlite-bothtml {
|
94 |
margin: 0;
|
95 |
padding: 0;
|
96 |
-
}
|
6 |
|
7 |
/*above the dashboard*/
|
8 |
.carbonlite-dashboard {
|
9 |
+
height: 63px;
|
10 |
width: 250px;
|
11 |
margin: 0 auto;
|
12 |
padding-top: 10px;
|
|
|
13 |
background: transparent url('images/bg_countdown.png') 0 0 no-repeat;
|
14 |
+
text-align: center;
|
15 |
}
|
16 |
|
17 |
.carbonlite-dash {
|
18 |
+
display: inline-block;
|
19 |
width: 42px;
|
20 |
height: 44px;
|
|
|
21 |
margin-left: 2px;
|
22 |
padding-left: 2px;
|
23 |
padding-top: 10px;
|
26 |
}
|
27 |
|
28 |
.carbonlite-tripdash {
|
29 |
+
display: inline-block;
|
30 |
width: 62px;
|
31 |
height: 44px;
|
|
|
32 |
margin-left: 2px;
|
33 |
padding-left: 2px;
|
34 |
padding-top: 10px;
|
43 |
.carbonlite-days_dash {
|
44 |
margin-left: 2px;
|
45 |
background: transparent url('images/bg_dash.png') 0 0 no-repeat;
|
46 |
+
|
47 |
}
|
48 |
|
49 |
.carbonlite-days_trip_dash {
|
93 |
.carbonlite-bothtml {
|
94 |
margin: 0;
|
95 |
padding: 0;
|
96 |
+
}
|
css/circle/style.css
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* countdown timer */
|
2 |
+
.circle-dash, .circle-tripdash {
|
3 |
+
display: inline-block;
|
4 |
+
width: 25%;
|
5 |
+
text-align: center;
|
6 |
+
width: 140px;
|
7 |
+
height: 140px;
|
8 |
+
border: 1px solid #000;
|
9 |
+
-moz-border-radius: 70px;
|
10 |
+
-webkit-border-radius: 70px;
|
11 |
+
border-radius: 70px;
|
12 |
+
background-color: transparent;
|
13 |
+
margin: 10px 5%;
|
14 |
+
font-size: 1.2em;
|
15 |
+
}
|
16 |
+
|
17 |
+
.circle-digit {
|
18 |
+
display: inline-table;
|
19 |
+
min-height: 50px;
|
20 |
+
height: 50px;
|
21 |
+
overflow: hidden !important;
|
22 |
+
}
|
23 |
+
|
24 |
+
.circle-dash_title {
|
25 |
+
margin-top: 40px;
|
26 |
+
text-transform: uppercase;
|
27 |
+
}
|
css/cloud-city/style.css
CHANGED
@@ -15,7 +15,6 @@
|
|
15 |
.cloud-city-dash {
|
16 |
width: 17%;
|
17 |
min-width: 23px;
|
18 |
-
height: 6em;
|
19 |
display: inline-block;
|
20 |
vertical-align: top;
|
21 |
margin-left: 1%;
|
@@ -26,10 +25,8 @@
|
|
26 |
white-space: nowrap;
|
27 |
}
|
28 |
.cloud-city-tripdash {
|
29 |
-
width:
|
30 |
min-width: 40px;
|
31 |
-
max-width: 90px;
|
32 |
-
height: 48px;
|
33 |
display: inline-block;
|
34 |
vertical-align: top;
|
35 |
margin-left: 1%;
|
@@ -62,8 +59,8 @@
|
|
62 |
border-bottom: 1px solid #c6c6c6;
|
63 |
}
|
64 |
|
65 |
-
.cloud-city-dash {
|
66 |
-
height: 5em;
|
67 |
}
|
68 |
|
69 |
.cloud-city-tripdash .cloud-city-digit {
|
@@ -86,6 +83,9 @@
|
|
86 |
.cloud-city-digit {
|
87 |
font-size: 2em;
|
88 |
}
|
|
|
|
|
|
|
89 |
}
|
90 |
|
91 |
@media screen and (max-width: 480px) {
|
@@ -94,7 +94,9 @@
|
|
94 |
font-size: 1.5em;
|
95 |
}
|
96 |
.cloud-city-dash {
|
|
|
|
|
|
|
97 |
height: 4em;
|
98 |
-
margin-left: 6px;
|
99 |
}
|
100 |
}
|
15 |
.cloud-city-dash {
|
16 |
width: 17%;
|
17 |
min-width: 23px;
|
|
|
18 |
display: inline-block;
|
19 |
vertical-align: top;
|
20 |
margin-left: 1%;
|
25 |
white-space: nowrap;
|
26 |
}
|
27 |
.cloud-city-tripdash {
|
28 |
+
width: 25%%;
|
29 |
min-width: 40px;
|
|
|
|
|
30 |
display: inline-block;
|
31 |
vertical-align: top;
|
32 |
margin-left: 1%;
|
59 |
border-bottom: 1px solid #c6c6c6;
|
60 |
}
|
61 |
|
62 |
+
.cloud-city-dash, .cloud-city-tripdash {
|
63 |
+
height: 5.5em;
|
64 |
}
|
65 |
|
66 |
.cloud-city-tripdash .cloud-city-digit {
|
83 |
.cloud-city-digit {
|
84 |
font-size: 2em;
|
85 |
}
|
86 |
+
.cloud-city-dash, .cloud-city-tripdash {
|
87 |
+
height: 4.5em;
|
88 |
+
}
|
89 |
}
|
90 |
|
91 |
@media screen and (max-width: 480px) {
|
94 |
font-size: 1.5em;
|
95 |
}
|
96 |
.cloud-city-dash {
|
97 |
+
margin-left: 6px;
|
98 |
+
}
|
99 |
+
.cloud-city-dash, .cloud-city-tripdash {
|
100 |
height: 4em;
|
|
|
101 |
}
|
102 |
}
|
css/sith/style.css
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
/*above the dashboard*/
|
2 |
.sith-tophtml,.sith-bothtml {
|
3 |
margin: 0 auto;
|
@@ -10,14 +13,14 @@
|
|
10 |
}
|
11 |
.sith-bothtml{
|
12 |
font-size: 24px;
|
13 |
-
|
14 |
|
15 |
/*above the dashboard*/
|
16 |
.sith-dashboard {
|
|
|
17 |
height: 60px;
|
18 |
-
width:
|
19 |
margin: auto;
|
20 |
-
background: transparent;
|
21 |
padding: 5px 5px 5px 0;
|
22 |
border:3px solid #222;
|
23 |
background: #4c4c4c; /* old browsers */
|
@@ -29,11 +32,11 @@
|
|
29 |
}
|
30 |
|
31 |
.sith-dash {
|
32 |
-
width: 65px;
|
33 |
height: 50px;
|
|
|
34 |
float: left;
|
35 |
-
margin-left:
|
36 |
-
padding-left:5px;
|
37 |
position: relative;
|
38 |
color: #333;
|
39 |
border:1px solid #333;
|
@@ -46,14 +49,25 @@
|
|
46 |
}
|
47 |
|
48 |
.sith-tripdash {
|
49 |
-
|
50 |
-
|
51 |
float: left;
|
52 |
-
margin-left:
|
53 |
-
padding-left:
|
54 |
-
padding-top: 5px;
|
55 |
position: relative;
|
56 |
color: #333;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
.sith-weeks_dash, .sith-days_dash, .sith-minutes_dash, .sith-seconds_dash {
|
@@ -89,13 +103,11 @@
|
|
89 |
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
90 |
display: block;
|
91 |
position: absolute;
|
92 |
-
left: -
|
93 |
-
top:
|
94 |
-
|
95 |
-
top: 0px\9;
|
96 |
-
width:50px;
|
97 |
color: #fff;
|
98 |
text-align: left;
|
99 |
font-size: 12px;
|
100 |
margin: 0;
|
101 |
-
}
|
1 |
+
.tminus_countdown {
|
2 |
+
text-align: center;
|
3 |
+
}
|
4 |
/*above the dashboard*/
|
5 |
.sith-tophtml,.sith-bothtml {
|
6 |
margin: 0 auto;
|
13 |
}
|
14 |
.sith-bothtml{
|
15 |
font-size: 24px;
|
16 |
+
}
|
17 |
|
18 |
/*above the dashboard*/
|
19 |
.sith-dashboard {
|
20 |
+
display: inline-block;
|
21 |
height: 60px;
|
22 |
+
width: auto;
|
23 |
margin: auto;
|
|
|
24 |
padding: 5px 5px 5px 0;
|
25 |
border:3px solid #222;
|
26 |
background: #4c4c4c; /* old browsers */
|
32 |
}
|
33 |
|
34 |
.sith-dash {
|
|
|
35 |
height: 50px;
|
36 |
+
width: 75px;
|
37 |
float: left;
|
38 |
+
margin-left: 20px;
|
39 |
+
padding-left: 5px;
|
40 |
position: relative;
|
41 |
color: #333;
|
42 |
border:1px solid #333;
|
49 |
}
|
50 |
|
51 |
.sith-tripdash {
|
52 |
+
height: 50px;
|
53 |
+
width: 105px;
|
54 |
float: left;
|
55 |
+
margin-left: 20px;
|
56 |
+
padding-left: 5px;
|
|
|
57 |
position: relative;
|
58 |
color: #333;
|
59 |
+
border:1px solid #333;
|
60 |
+
-moz-border-radius: 5px; -webkit-border-radius:5px; border-radius: 5px;
|
61 |
+
background: #FFFFFF; /* old browsers */
|
62 |
+
background: -moz-linear-gradient(top, #FFFFFF 0%, #D6D6D6 52%, #C9C9C9 57%, #E5E5E5 100%); /* firefox */
|
63 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(52%,#D6D6D6), color-stop(57%,#C9C9C9), color-stop(100%,#E5E5E5)); /* webkit */
|
64 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#E5E5E5',GradientType=0 ); /* ie */
|
65 |
+
-webkit-box-shadow: 2px 2px 5px #000; -moz-box-shadow: 2px 2px 5px #000;box-shadow: 2px 2px 5px #000;
|
66 |
+
}
|
67 |
+
|
68 |
+
.sith-dash:last-of-type {
|
69 |
+
margin-right: 10px;
|
70 |
+
padding-right: 5px;
|
71 |
}
|
72 |
|
73 |
.sith-weeks_dash, .sith-days_dash, .sith-minutes_dash, .sith-seconds_dash {
|
103 |
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
104 |
display: block;
|
105 |
position: absolute;
|
106 |
+
left: -34px;
|
107 |
+
top: 13px;
|
108 |
+
width: 50px;
|
|
|
|
|
109 |
color: #fff;
|
110 |
text-align: left;
|
111 |
font-size: 12px;
|
112 |
margin: 0;
|
113 |
+
}
|
js/jquery.t-countdown.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*
|
2 |
-
* T- Countdown
|
3 |
* http://plugins.twinpictures.de/plugins/t-minus-countdown/
|
4 |
*
|
5 |
-
* Copyright
|
6 |
*
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8 |
* of this software and associated documentation files (the "Software"), to deal
|
@@ -37,6 +37,11 @@
|
|
37 |
var nowobj = $.parseJSON( tminusnow );
|
38 |
nowTime = new Date(nowobj.now);
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
style = config.style;
|
41 |
$.data($(this)[0], 'style', config.style);
|
42 |
|
@@ -128,7 +133,7 @@
|
|
128 |
days = Math.floor(Math.abs(diffSecs/60/60/24)%7);
|
129 |
weeks = Math.floor(Math.abs(diffSecs/60/60/24/7));
|
130 |
}
|
131 |
-
|
132 |
|
133 |
$this.dashTminusChangeTo(id, style + '-seconds_dash', secs, duration ? duration : 500);
|
134 |
$this.dashTminusChangeTo(id, style + '-minutes_dash', mins, duration ? duration : 1000);
|
@@ -150,11 +155,12 @@
|
|
150 |
if (diffSecs > 0 || $.data($this[0], 'launchtarget') == 'countup'){
|
151 |
if($.data($this[0], 'status') == 'play'){
|
152 |
|
153 |
-
//why set the style here?
|
154 |
-
//style = $.data($this[0], 'style');
|
155 |
-
|
156 |
//recaculate diffSecs
|
|
|
|
|
157 |
nowTime = new Date();
|
|
|
|
|
158 |
//console.log('hey dude: ', tminusTargetTime.valueOf(), $.data($this[0], 'tminusTargetTime').valueOf() );
|
159 |
|
160 |
diffSecs = Math.floor(($.data($this[0], 'tminusTargetTime').valueOf()-nowTime.valueOf())/1000);
|
1 |
/*
|
2 |
+
* T- Countdown v2.4.0
|
3 |
* http://plugins.twinpictures.de/plugins/t-minus-countdown/
|
4 |
*
|
5 |
+
* Copyright 2018, Twinpictures
|
6 |
*
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8 |
* of this software and associated documentation files (the "Software"), to deal
|
37 |
var nowobj = $.parseJSON( tminusnow );
|
38 |
nowTime = new Date(nowobj.now);
|
39 |
|
40 |
+
//ofset from browser time
|
41 |
+
browserTime = new Date();
|
42 |
+
timeOffset = Math.floor((nowTime.valueOf()-browserTime.valueOf())/1000);
|
43 |
+
$.data($(this)[0], 'timeOffset', timeOffset);
|
44 |
+
|
45 |
style = config.style;
|
46 |
$.data($(this)[0], 'style', config.style);
|
47 |
|
133 |
days = Math.floor(Math.abs(diffSecs/60/60/24)%7);
|
134 |
weeks = Math.floor(Math.abs(diffSecs/60/60/24/7));
|
135 |
}
|
136 |
+
style = $.data($this[0], 'style');
|
137 |
|
138 |
$this.dashTminusChangeTo(id, style + '-seconds_dash', secs, duration ? duration : 500);
|
139 |
$this.dashTminusChangeTo(id, style + '-minutes_dash', mins, duration ? duration : 1000);
|
155 |
if (diffSecs > 0 || $.data($this[0], 'launchtarget') == 'countup'){
|
156 |
if($.data($this[0], 'status') == 'play'){
|
157 |
|
|
|
|
|
|
|
158 |
//recaculate diffSecs
|
159 |
+
|
160 |
+
//this is the current browser time, not so good, as we also need an offset
|
161 |
nowTime = new Date();
|
162 |
+
timeOffset = $.data($this[0], 'timeOffset');
|
163 |
+
nowTime.setSeconds(nowTime.getSeconds() + timeOffset);
|
164 |
//console.log('hey dude: ', tminusTargetTime.valueOf(), $.data($this[0], 'tminusTargetTime').valueOf() );
|
165 |
|
166 |
diffSecs = Math.floor(($.data($this[0], 'tminusTargetTime').valueOf()-nowTime.valueOf())/1000);
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
Contributors: twinpictures, baden03
|
4 |
Donate link: https://plugins.twinpictures.de/plugins/t-minus-countdown/
|
5 |
Tags: countdown, timer, clock, ticker, widget, event, counter, count down, twinpictures, t minus, t-minus, t(-), t(-) countdown, t-countdown, t (-) countdown, plugin-oven, pluginoven, G2, spaceBros, littlewebtings, jQuery, javascript
|
6 |
-
Requires at least: 4.
|
7 |
-
Tested up to: 4.9.
|
8 |
-
Stable tag: 2.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -65,6 +65,11 @@ Ah yes! <a href='https://twitter.com/#!/twinpictures'>@Twinpictures</a> is on th
|
|
65 |
|
66 |
== Changelog ==
|
67 |
|
|
|
|
|
|
|
|
|
|
|
68 |
= 2.3.18 =
|
69 |
* rebuilt method of keeping countdown timer in sync
|
70 |
* Prevent errors when $(this) isn't an array
|
@@ -309,7 +314,6 @@ Ah yes! <a href='https://twitter.com/#!/twinpictures'>@Twinpictures</a> is on th
|
|
309 |
* The plugin came to be.
|
310 |
|
311 |
== Upgrade Notice ==
|
312 |
-
*
|
313 |
-
*
|
314 |
-
*
|
315 |
-
* fully tested with WordPress 4.9.0
|
3 |
Contributors: twinpictures, baden03
|
4 |
Donate link: https://plugins.twinpictures.de/plugins/t-minus-countdown/
|
5 |
Tags: countdown, timer, clock, ticker, widget, event, counter, count down, twinpictures, t minus, t-minus, t(-), t(-) countdown, t-countdown, t (-) countdown, plugin-oven, pluginoven, G2, spaceBros, littlewebtings, jQuery, javascript
|
6 |
+
Requires at least: 4.7
|
7 |
+
Tested up to: 4.9.4
|
8 |
+
Stable tag: 2.3.19
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
65 |
|
66 |
== Changelog ==
|
67 |
|
68 |
+
= 2.3.19 =
|
69 |
+
* updated CSS to deal with omit-weeks and trip dash issues
|
70 |
+
* now calculates any offset between server and browser times for countdown calculations
|
71 |
+
* added circle style
|
72 |
+
|
73 |
= 2.3.18 =
|
74 |
* rebuilt method of keeping countdown timer in sync
|
75 |
* Prevent errors when $(this) isn't an array
|
314 |
* The plugin came to be.
|
315 |
|
316 |
== Upgrade Notice ==
|
317 |
+
* updated CSS to deal with omit-weeks and trip dash issues
|
318 |
+
* now calculates any offset between server and browser times for countdown calculations
|
319 |
+
* added circle style
|
|