User:Seb35/common.js

mw.loader.load( "/w/index.php?title=User:Magnus_Manske/wikipic.js&action=raw&ctype=text/javascript" );

/* Workaround some bug on my account in the count of the new messages whose minimum is 1 */ $( function { var r = /^(.*) \((\d*)\)$/.exec( $('#pt-newmessages').text );  if( r == null ) r = [ $('#pt-newmessages').text, $('#pt-newmessages').text, '0' ];  if( r[2] == '1' ) $('#pt-newmessages a').text( r[1] );  else $('#pt-newmessages a').text( r[1] + ' (' + (parseInt(r[2])-1) + ')' ); } );