mw.loader.implement("UC.gallerymodify",function($,jQuery){window.processNSFWGalleryItems=function(scope){$('div.gallerytext',scope).each(function(i,el){var descP=$('p:first',el) if(!descP.size())return;var desc=descP.html() if(desc.match(/(?:\|NSFW|NSFW\||^NSFW\s$)/i)){descP.html(desc.replace(/(.*)(?:\|NSFW|NSFW\||^NSFW\s$)(.*)/i,'$1$2'));var NSFWFrame=$(el).parent().find('div:first') NSFWFrame.children().css('visibility','hidden') NSFWFrame.css({'background':'url(/skins/common/images/nsfw.png) no-repeat center','cursor':'pointer'}) NSFWFrame.click(function(e){NSFWFrame.css({'background-image':'none','cursor':'default'}) NSFWFrame.children().css('visibility','visible')})}})};window.dynamicGallery=function(scope){$('.gallery',scope).each(function(){var gall=$(this);var galwidth=gall.width();var boxwidth=gall.find('.gallerybox').width();var t=Math.floor(galwidth/boxwidth);if(gall.find('li').length>t){var sh='показать еще';var hd=' ';gall.find('li').last().after('