User:RubenVerg/common.js

//common.js

//Rollback confirmation (function {		$(".mw-rollback-link").on('click', function(e) { var linkText = $(e.target).text, count = linkText.match(/\d/) ? linkText.match(/\d+/)[0] : null, message = 'Rollback ' + (count ? count + ' edits' : 'edit') + ' by ' + mw.util.getParamValue('from',e.target.href) + '?'; if(!confirm(message)) return e.preventDefault; }); });

//Show Doc: prefix if (    $.inArray( mw.config.get( 'wgNamespaceNumber' ), [ 10, 11, 828, 829 ] ) > -1 ||    $.inArray( mw.config.get( 'wgNamespaceNumber' ), [ 2, 3 ] ) > -1 &&    mw.config.get( 'wgTitle' ).replace( /\/doc$/, '' ).search( /\.(js|css)$/ ) > -1 ) { importScript( 'User:Majr/docTabs.js' ); }