Content deleted Content added
oops, fix |
fix some old JS issues |
||
Line 1:
$.when( mw.loader.using( [ 'mediawiki.util'] ), $.ready ).then( function() {
if((mw.config.get('wgNamespaceNumber') !== 0) && (mw.config.get('wgNamespaceNumber' !== 2))) {
// only check links in mainspace and userspace (for userspace drafts)
return;
Line 27:
var finddups = function() {
var href = $(this).attr('href');
if(href !== undefined && href.indexOf('#') !== 0) {
if(seen[href]) {
$(this).addClass("duplicate-link");
Line 40:
var seen = [];
mw.util.$content.find('p a').not('#lead *, .infobox *, .navbox *').each(finddups);
mw.util.$content.find('#lead p a').not('.infobox *, .navbox *').each(finddups);
});
|