A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

MediaWiki:Gadget-exlinks.js: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
m (1 revision: Import exlinks gadget)
 
(No difference)

Latest revision as of 18:27, 23 October 2012

// **********************************************************************
// **                 ***WARNING GLOBAL GADGET FILE***                 **
// **             changes to this file affect many users.              **
// **           please discuss on the talk page before editing         **
// **                                                                  **
// **********************************************************************

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