Reduce the number of YouTube videos shown in topics and posts
Liquid Code :: Coding Factory :: Scripting :: Finished scripts :: Graphics
Page 1 of 1 • Share
Reduce the number of YouTube videos shown in topics and posts
Guest- Guest
JS placement 'In the topics':
This example is for 5 videos being shown, 6th etc will be made URLs only.
- Code:
$(document).ready(function() {
var videos = '4'; /* videos converted to URL after 5 videos. 4 = 5, 0 = 1 */
$('.post .content embed:gt('+videos+')').each(function() {
var src = $(this).attr('src');
$(this).before('<a href="'+src+'" target="_blank">'+src+'</a>').remove();
});
});
This example is for 5 videos being shown, 6th etc will be made URLs only.
Similar topics
» Resize Avatars in Posts and Topics
» increase/decrease font size in topics
» Prevent guests from viewing the topics and / or forums
» increase/decrease font size in topics
» Prevent guests from viewing the topics and / or forums
Liquid Code :: Coding Factory :: Scripting :: Finished scripts :: Graphics
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum