User:Vish/common.js

(function ($, mw) {	// wrap non thumb images first	$('img[alt*=NSFWTAG]').each(function (i, e) { $(e).wrap($(' ').css({ display: 'block', width: $(e).width + 'px', height: $(e).height + 'px', backgroundColor: '#eee' }));	}).parent.add($('.thumbinner,.gallerybox').has('.nsfwelement').find('.image').parent)	.one('click', function (e) { console.log($(e)); $(this).css('background', 'none').find('img').css({			visibility: ''		}); e.preventDefault; })	.css({ backgroundImage: 'url("https://static.jojowiki.com/images/customizations/Dialog-warning-yellow.png")', backgroundRepeat: 'no-repeat', backgroundPosition: 'center' })	.find('img').css({ visibility: 'hidden' }); }(jQuery, mediaWiki));