User:Vish/common.js

(function ($, mw) {	var ti = mw.config.get("wgTitle");	if ($.inArray(mw.config.get('wgNamespaceNumber'), [0, 1, 2, 3, 4, 5, 6, 10, 11, 14, 15]) === -1)		return;	// wrap non thumb images first	$('img[alt*=NSFWTAG]').each(function (i, e) { var title = this.parentElement.title; title = title.replace('NSFWTAG', ''); $(e).parent.attr('title', title); }).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','.image-lazy-loaded').css({ visibility: 'hidden' }); }(jQuery, mediaWiki));