MediaWiki:Gadget-exlinks.js

/* ********************************************************************** * **                ***WARNING GLOBAL GADGET FILE***                 ** * **            changes to this file affect many users. ** * **          please discuss on the talk page before editing         ** * **                                                                 ** * ********************************************************************** * Copied from en.wikipedia.org/wiki/MediaWiki:Gadget-exlinks.js */

$( 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' ); }	}); });