countdowner 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,7 @@
|
|
1
1
|
(function() {
|
2
|
+
var $;
|
3
|
+
|
4
|
+
$ = jQuery;
|
2
5
|
|
3
6
|
$(function() {
|
4
7
|
var $countdowner, updateCountdowner,
|
@@ -8,10 +11,10 @@
|
|
8
11
|
updateCountdowner = function() {
|
9
12
|
var now;
|
10
13
|
now = new Date().toISOString();
|
11
|
-
if ($countdowner.
|
14
|
+
if ($countdowner.attr('data-start_at') <= now) {
|
12
15
|
$countdowner.show();
|
13
16
|
}
|
14
|
-
if ($countdowner.
|
17
|
+
if ($countdowner.attr('data-end_at') < now) {
|
15
18
|
$countdowner.remove();
|
16
19
|
if (_this.updateCountdownerTimer != null) {
|
17
20
|
return clearInterval(_this.updateCountdownerTimer);
|
@@ -1,11 +1,12 @@
|
|
1
|
+
$ = jQuery
|
1
2
|
$ ->
|
2
3
|
$countdowner = $('#countdowner')
|
3
4
|
if $countdowner.length
|
4
5
|
updateCountdowner = =>
|
5
6
|
now = new Date().toISOString()
|
6
|
-
if $countdowner.
|
7
|
+
if $countdowner.attr('data-start_at') <= now
|
7
8
|
$countdowner.show()
|
8
|
-
if $countdowner.
|
9
|
+
if $countdowner.attr('data-end_at') < now
|
9
10
|
$countdowner.remove()
|
10
11
|
clearInterval(@updateCountdownerTimer) if @updateCountdownerTimer?
|
11
12
|
$.timeago.settings.allowFuture = true
|
data/lib/countdowner/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: countdowner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -156,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
segments:
|
158
158
|
- 0
|
159
|
-
hash:
|
159
|
+
hash: 1355530477148782508
|
160
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
segments:
|
167
167
|
- 0
|
168
|
-
hash:
|
168
|
+
hash: 1355530477148782508
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
171
|
rubygems_version: 1.8.24
|