diff --git a/plugins/lazyYT/assets/javascripts/lazyYT.js b/plugins/lazyYT/assets/javascripts/lazyYT.js
index 498910cdf..1f2cc9068 100644
--- a/plugins/lazyYT/assets/javascripts/lazyYT.js
+++ b/plugins/lazyYT/assets/javascripts/lazyYT.js
@@ -16,11 +16,11 @@
height = $el.data('height'),
ratio = ($el.data('ratio')) ? $el.data('ratio') : settings.default_ratio,
id = $el.data('youtube-id'),
+ title = $el.data('youtube-title'),
padding_bottom,
innerHtml = [],
$thumb,
thumb_img,
- loading_text = $el.text() ? $el.text() : settings.loading_text,
youtube_parameters = $el.data('parameters') || '';
ratio = ratio.split(":");
@@ -64,8 +64,12 @@
innerHtml.push('
');
innerHtml.push('
');
innerHtml.push('
'); // .html5-title
innerHtml.push('
'); // .html5-title-text-wrapper
@@ -102,15 +106,10 @@
}
});
- $.getJSON('https://gdata.youtube.com/feeds/api/videos/' + id + '?v=2&alt=json', function (data) {
- $el.find('#lazyYT-title-' + id).text(data.entry.title.$t);
- });
-
}
$.fn.lazyYT = function (newSettings) {
var defaultSettings = {
- loading_text: 'Loading...',
default_ratio: '16:9',
callback: null, // ToDO execute callback if given
container_class: 'lazyYT-container'
diff --git a/plugins/lazyYT/plugin.rb b/plugins/lazyYT/plugin.rb
index cf02d9088..7a9b8fc2a 100644
--- a/plugins/lazyYT/plugin.rb
+++ b/plugins/lazyYT/plugin.rb
@@ -18,7 +18,7 @@ class Onebox::Engine::YoutubeOnebox
def to_html
if video_id
# Put in the LazyYT div instead of the iframe
- "
"
+ "
"
else
super
end