User:Gardimuer/wikia.js

// ============================================================ // BEGIN Template:TableSectionExpand // ============================================================ // Description: Add expandable sections to wide tables. This code is retarded; I know nothing about JavaScript. // Credit:     User:Gardimuer function addSectionExpand { var sectionExpand = $('.sectionExpand'); var sectionPreview = $('.sectionPreview'); var tableSection = $('.tableSection'); if (sectionExpand.length > 0 && $('a', sectionPreview).length > 0) { if (tableSection.length > 0) { sectionExpand.css('display', 'block').appendTo(tableSection); }		$('.table-section-more').append(''); sectionExpand.hover(			function {				$(this).addClass('section-expand-hover');			}, function  {				$(this).removeClass('section-expand-hover');			}); } } jQuery(function($) {  if (skin == 'monobook' || skin == 'oasis' || skin == 'wikia') {      addSectionExpand;   } }); // ============================================================ // END Template:TableSectionExpand // ============================================================