tmin 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tmin (0.1.3)
4
+ tmin (0.1.5)
5
5
  dm-aggregates (~> 1.2.0)
6
6
  dm-core (~> 1.2.0)
7
7
  dm-migrations (~> 1.2.0)
data/firefly.sqlite3 CHANGED
Binary file
data/lib/tmin/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Tminus
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
data/tmin-0.1.5.gem ADDED
Binary file
data/views/admin.haml CHANGED
@@ -6,6 +6,10 @@
6
6
  Drag the following link to your bookmarks. Click it to shorten the URL to the page you're currently viewing.
7
7
  %p
8
8
  %a{ :href => "javascript:var%20d=document,w=window,enc=encodeURIComponent,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),s2=((s.toString()=='')?s:('%22'+enc(s)+'%22')),key=enc('#{@config[:api_key]}'),f='http://#{@config[:hostname]}/api/add',l=d.location,p='?visual=1&api_key='+key+'&url='+enc(l.href),u=f+p;try{if(!/^(.*\.)?tumblrzzz[^.]*$/.test(l.host))throw(0);tstbklt();}catch(z){a%20=function(){if(!w.open(u))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}void(0)" } Shorten with #{@config[:hostname]}
9
+ %br
10
+ %h2
11
+ Total Events Created:
12
+ = Firefly::Url.count
9
13
 
10
14
  %h1 How about shortening a URL?
11
15
 
data/views/redirect.haml CHANGED
@@ -3,38 +3,39 @@
3
3
 
4
4
  :javascript
5
5
 
6
- function simulateClick(elId) {
7
- var evt;
8
- var el = document.getElementById(elId);
9
- if (document.createEvent) {
10
- evt = document.createEvent("MouseEvents");
11
- evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
12
- }
13
- (evt) ? el.dispatchEvent(evt) : (el.click && el.click());
14
- }
15
-
16
-
17
- var appstorefail = "itms://itunes.apple.com/us/app/tminus-make-share-countdown/id507726329?mt=8";
18
- function applink(fail){
19
- return function(){
20
- var clickedAt = +new Date;
21
- // During tests on 3g/3gs this timeout fires immediately if less than 500ms.
22
- setTimeout(function(){
23
- // To avoid failing on return to MobileSafari, ensure freshness!
24
- if (+new Date - clickedAt < 2000){
25
- window.location = fail;
26
- }
27
- }, 500);
28
- };
29
- }
30
-
31
- if(/https:\/\/(www\.)?twitter.com/.test(document.referrer)) {
32
- simulateClick("applink1");
33
- }
34
- else {
35
-
36
- document.getElementById("applink1").onclick = applink(appstorefail);
37
- var button = document.getElementById("applink1")
38
- simulateClick("applink1");
39
-
40
- }
6
+ function simulateClick(elId) {
7
+ var evt;
8
+ var el = document.getElementById(elId);
9
+ if (document.createEvent) {
10
+ evt = document.createEvent("MouseEvents");
11
+ evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
12
+ }
13
+ (evt) ? el.dispatchEvent(evt) : (el.click && el.click());
14
+ }
15
+
16
+
17
+ var appstorefail = "itms://itunes.apple.com/us/app/tminus-make-share-countdown/id507726329?mt=8";
18
+ function applink(fail){
19
+ return function(){
20
+ var clickedAt = +new Date;
21
+ // During tests on 3g/3gs this timeout fires immediately if less than 500ms.
22
+ setTimeout(function(){
23
+ // To avoid failing on return to MobileSafari, ensure freshness!
24
+ if (+new Date - clickedAt < 2000){
25
+ window.location = fail;
26
+ }
27
+ }, 500);
28
+ };
29
+ }
30
+
31
+ if(/https:\/\/(www\.)?twitter.com/.test(document.referrer)) {
32
+ simulateClick("applink1");
33
+ }
34
+ else {
35
+
36
+ document.getElementById("applink1").onclick = applink(appstorefail);
37
+ var button = document.getElementById("applink1")
38
+ simulateClick("applink1");
39
+
40
+ }
41
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: tmin
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - drobs
@@ -191,8 +191,7 @@ files:
191
191
  - spec/spec_helper.rb
192
192
  - test/helper.rb
193
193
  - test/test_tmin.rb
194
- - tmin-0.1.3.gem
195
- - tmin-0.1.4.gem
194
+ - tmin-0.1.5.gem
196
195
  - tmin.gemspec
197
196
  - views/admin.haml
198
197
  - views/ec.haml
data/tmin-0.1.3.gem DELETED
Binary file
data/tmin-0.1.4.gem DELETED
Binary file