Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
// Adds an "Open in new window" link on Category pages. Helps to do bot check and deletions.AddOpenFilesInNewWindowLink('#mw-category-media');AddOpenFilesInNewWindowLink('#mw-pages');AddOpenFilesInNewWindowLink('#mw-subcategories');AddOpenFilesInNewWindoLinkForGallery();functionAddOpenFilesInNewWindoLinkForGallery(){var$galleryCaption=$('.gallerycaption');varcatText=$galleryCaption.text();catText=catText+' (<a class="javascript" href="javascript:OpenFilesInNewWindowForGallery()">Open in new window</a>)';$galleryCaption.html(catText);}functionOpenFilesInNewWindowForGallery(){varmaxCount=prompt('How many files to be opened in a new window?','7');varcurrentCount=1;$('.gallery').find('.image').each(function(link){if(currentCount++>maxCount)returnfalse;window.open(this.getAttribute('href'),'_blank');});}functionAddOpenFilesInNewWindowLink(mwElm){var$mwElm=$(mwElm);varcatText=$mwElm.find('p').html();catText=catText+'(<a class="javascript" href="javascript:OpenFilesInNewWindow(\''+mwElm+'\')">Open in new window</a>)';$mwElm.find('p').html(catText);}functionOpenFilesInNewWindow(mwElm){varmaxCount=prompt('How many files to be opened in a new window?','7');varcurrentCount=1;$(mwElm).find('a:not(.image):not(.galleryfilename):not(.javascript)').each(function(link){var$this=$(this);if($this.html()!='previous 200'&&$this.html()!='previous page'&&$this.html()!='next 200'&&$this.html()!='next page'&&$this.attr('href')){if(currentCount++>maxCount)returnfalse;window.open($this.attr('href'),'_blank');}});}