countdowner 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,11 @@
1
1
  (function() {
2
2
 
3
3
  $(function() {
4
- var $countdowner, allowFuture, removeAfterEnd,
4
+ var $countdowner, removeAfterEnd,
5
5
  _this = this;
6
6
  $countdowner = $('#countdowner');
7
7
  if ($countdowner.length) {
8
8
  removeAfterEnd = function() {
9
- console.log("checking...");
10
9
  if ($countdowner.data('end_at') < new Date().toISOString()) {
11
10
  $countdowner.remove();
12
11
  if (_this.checkEnd != null) {
@@ -16,11 +15,9 @@
16
15
  }
17
16
  };
18
17
  if (!removeAfterEnd()) {
19
- allowFuture = $.timeago.settings.allowFuture;
20
18
  $.timeago.settings.allowFuture = true;
21
19
  $countdowner.find('time').timeago();
22
20
  $countdowner.show();
23
- $.timeago.settings.allowFuture = allowFuture;
24
21
  return this.checkEnd = setInterval(removeAfterEnd, 60000);
25
22
  }
26
23
  }
@@ -7,9 +7,7 @@ $ ->
7
7
  clearInterval(@checkEnd) if @checkEnd?
8
8
  true
9
9
  unless removeAfterEnd()
10
- allowFuture = $.timeago.settings.allowFuture
11
10
  $.timeago.settings.allowFuture = true
12
11
  $countdowner.find('time').timeago()
13
12
  $countdowner.show()
14
- $.timeago.settings.allowFuture = allowFuture
15
13
  @checkEnd = setInterval(removeAfterEnd, 60000)
@@ -1,3 +1,3 @@
1
1
  module Countdowner
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-18 00:00:00.000000000 Z
12
+ date: 2012-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -156,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  segments:
158
158
  - 0
159
- hash: 2442185988410086350
159
+ hash: 2446644807931660482
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: 2442185988410086350
168
+ hash: 2446644807931660482
169
169
  requirements: []
170
170
  rubyforge_project:
171
171
  rubygems_version: 1.8.24