User:Begoon/exlinks.js

// ********************************************************************** // **           Open External links in new tab/window                 ** // ********************************************************************** $( function {	var $alinks = mw.util.$content.find( 'a' );	$alinks.each( function { var $tablink = $( this ); if ( $tablink.hasClass( 'external' ) && $tablink.attr( 'href' ).indexOf( mw.config.get( 'wgServer' ) ) !== 0 ) { $tablink.attr( 'target', '_blank' ); }	}); });