onebox 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 508c2c0050946f9540e3b3738fc4338d675ee30f
4
- data.tar.gz: 632a6f4a74e9ecddcbd61c6cb8fbe167033f7af2
3
+ metadata.gz: 28e966aab6b9cb159a61e21ba464d8587c2c0f74
4
+ data.tar.gz: afc48dab705818660e618ce917fd0e88f17a884c
5
5
  SHA512:
6
- metadata.gz: 49d9482a146d3fce50c301537df28eaf6b2a03386480735d8a6a64bc6c6abb035e41ea23cf8ece9294b73bdc43020d76c7b388bcfe49737a819d98d4ddcc1ff6
7
- data.tar.gz: 2f159656943c1a5e480c5838f7a4e07b7f6a1ab90eb867fb8a4e6a62b0f90e5a628565820feaccdfcf1b490668ae628ffd0ab26350375407a3b5c80149a0c8f4
6
+ metadata.gz: 349acadd62a19705a0932560807790914ff0a428a826d3bbde23f5fa19bb32518f94a556153f6aea4496718018b3f06af332f62ad7bc937c958eb3199f4493cb
7
+ data.tar.gz: 11db97325e4ed5a5487ffe8a14a1ab6ffad21265031fa687d1fcce77b683273cea1d9f177eb4ea45d55d07ae8314ae376a790476b127fa6ba09dc3d5f807bf8c
@@ -39,8 +39,14 @@ module Onebox
39
39
  def append_params(html)
40
40
  result = html.dup
41
41
  result.gsub! /(src="[^"]+)/, '\1&wmode=opaque'
42
- if url =~ /t=(\d+)/
43
- result.gsub! /(src="[^"]+)/, '\1&start=' + Regexp.last_match[1]
42
+ if url =~ /t=(\d+h)?(\d+m)?(\d+s?)?/
43
+ h = Regexp.last_match[1].to_i
44
+ m = Regexp.last_match[2].to_i
45
+ s = Regexp.last_match[3].to_i
46
+
47
+ total = (h * 60 * 60) + (m * 60) + s
48
+
49
+ result.gsub! /(src="[^"]+)/, '\1&start=' + total.to_s
44
50
  end
45
51
  result
46
52
  end
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.3.6"
2
+ VERSION = "1.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joanna Zeta