onebox 1.5.24 → 1.5.25

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: 325c78dc8e7b023d1c9fa602668ac063886f0a96
4
- data.tar.gz: a3313ae6ceabd4b2afb05082d24bb2a85c288ad4
3
+ metadata.gz: 57efadb1bc8e77d128214915de1dcbda8dfd1154
4
+ data.tar.gz: 5a2a0ffd8873df483203f6d5c568c16dd2f47fb0
5
5
  SHA512:
6
- metadata.gz: 435767c92b01387432db95e26cf0ccc954c18b4644f25fc5ad235b0ca211252816d780fb14c9ad2ca375cae63457dbcbdc65187b62873f845de52b6655e80bc2
7
- data.tar.gz: 24cce4308f5a83b0d6a4aba6efd81626abd260bb6ce446b74704a159882df7e13159cc16992a32b1656b3ae8051cc7fefbd7a2fa26baf3f14c0d3826b933c518
6
+ metadata.gz: 240aed01333c98296417b14115e5f76855eecbe4a026a7c38eab74355c00c65cd572a9d83ca8f7edbdf5073332b5c9884b19ea4580db3f4ee859e629b96baa1a
7
+ data.tar.gz: 970b6673d3937d0f669ec8808d47b022139c3901eefabdbf8f785cad046124dd1fae9bd770522f6669165a4bfca88a376ccd683448b9697bd80d66c7b564e4c0
@@ -11,7 +11,15 @@ module Onebox
11
11
  imgur_data = get_imgur_data
12
12
  return "<video width='#{imgur_data[:"player:width"]}' height='#{imgur_data[:"player:height"]}' controls autoplay loop><source src='#{imgur_data[:"player:stream"]}' type='video/mp4'><source src='#{imgur_data[:"player:stream"].gsub('mp4', 'webm')}' type='video/webm'></video>" if imgur_data[:"player:stream"]
13
13
  return "<a href='#{url}' target='_blank'><img src='#{imgur_data[:image]}' alt='Imgur' height='#{imgur_data[:"image:height"]}' width='#{imgur_data[:"image:width"]}'></a>" if imgur_data[:image]
14
- return "<a href='#{url}' target='_blank'><img src='#{imgur_data[:"image0:src"]}' alt='Imgur'></a>" if imgur_data[:"image0:src"]
14
+ return "<div><a href='#{url}' target='_blank'><img src='#{imgur_data[:"image0:src"]}' alt='Imgur'></a><div style='position: absolute;top: 0;z-index: 935;width: 100%;height: 30px;overflow: hidden;font-size: 12px;color: #fff;background-color: rgba(0, 0, 0, 0.8);'><div style='padding-left: 10px;padding-right: 10px;overflow: hidden;text-overflow: ellipsis;word-wrap: normal;white-space: nowrap;'><a style='width: 100%;font-size: 13px;line-height: 30px;color: #ccc;text-decoration: none;' target='_blank' href='#{url}'>[Album] #{imgur_data[:title]}</a></div></div></div>" if imgur_data[:"image0:src"]
15
+ return nil
16
+ end
17
+
18
+ def placeholder_html
19
+ imgur_data = get_imgur_data
20
+ return "<video width='#{imgur_data[:"player:width"]}' height='#{imgur_data[:"player:height"]}' controls autoplay loop><source src='#{imgur_data[:"player:stream"]}' type='video/mp4'><source src='#{imgur_data[:"player:stream"].gsub('mp4', 'webm')}' type='video/webm'></video>" if imgur_data[:"player:stream"]
21
+ return "<img src='#{imgur_data[:image]}' alt='Imgur' height='#{imgur_data[:"image:height"]}' width='#{imgur_data[:"image:width"]}'>" if imgur_data[:image]
22
+ return "<img src='#{imgur_data[:"image0:src"]}' alt='Imgur'>" if imgur_data[:"image0:src"]
15
23
  return nil
16
24
  end
17
25
 
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.5.24"
2
+ VERSION = "1.5.25"
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.5.24
4
+ version: 1.5.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joanna Zeta
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-08-31 00:00:00.000000000 Z
13
+ date: 2015-09-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json