Charlie Markwick wrote:
See
http://www.mediawiki.org/wiki/JQuery_snippets#External_links_in_Sidebar_
in_new_window
Can anyone help me understand how to use the suggestion in this link.
I'm not sure where to start.
Just put the following JavaScript code in your wiki's MediaWiki:Common.js
page:
// Anything in this function wrapper will be executed when the page is ready
for action
( function( $ ) {
$( document ).ready( function() {
// Open external links in the sidebar in a new window
$( '#mw-panel, #panel' ) // #panel is for pre-1.17 compatibility
.find( 'li a' )
.filter( '[href^=http://], [href^=https://]' )
.attr( 'target' , '_blank' );
} );
} )( jQuery );
--
View this message in context:
http://old.nabble.com/%22Category%3A-Noindexed-pages%22-puzzle-tp30698862p3…
Sent from the WikiMedia General mailing list archive at
Nabble.com.