youtube.js related fixes done by a Finland Anon on /devel/

This commit is contained in:
czaks 2014-01-01 18:02:55 +01:00 committed by Michael Foster
parent 9c17183e41
commit 2049341b70
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ $(document).ready(function(){
hidden_data[board][id] = Math.round(Date.now() / 1000); hidden_data[board][id] = Math.round(Date.now() / 1000);
store_data(); store_data();
thread_container.find('div.post,img,p.fileinfo,a.hide-thread-link,br').hide(); thread_container.find('div.post,div.video-container,img,p.fileinfo,a.hide-thread-link,br').hide();
var hidden_div = thread_container.find('div.post.op > p.intro').clone(); var hidden_div = thread_container.find('div.post.op > p.intro').clone();
hidden_div.addClass('thread-hidden'); hidden_div.addClass('thread-hidden');
@ -63,7 +63,7 @@ $(document).ready(function(){
.click(function() { .click(function() {
delete hidden_data[board][id]; delete hidden_data[board][id];
store_data(); store_data();
thread_container.find('div.post,img,p.fileinfo,a.hide-thread-link,br').show(); thread_container.find('div.post,div.video-container,img,p.fileinfo,a.hide-thread-link,br').show();
$(this).remove(); $(this).remove();
hidden_div.remove(); hidden_div.remove();
}); });

View File

@ -15,7 +15,7 @@
* $config['embedding'] = array(); * $config['embedding'] = array();
* $config['embedding'][0] = array( * $config['embedding'][0] = array(
* '/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i', * '/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
* '<div class="video-container" data-video="$2"><a href="$0" target="_blank" class="file"><img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg"/></a></div>' * '<div class="video-container" data-video="$2"><a href="$0" target="_blank" class="file"><img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/></a></div>'
); );
* $config['additional_javascript'][] = 'js/jquery.min.js'; * $config['additional_javascript'][] = 'js/jquery.min.js';
* $config['additional_javascript'][] = 'js/youtube.js'; * $config['additional_javascript'][] = 'js/youtube.js';