MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 13: Line 13:
}
}
var talkUrl = talkTab.attr('href').replace('index.php?title=', '').replace(namespace, 'User').replace('&action=edit&redlink=1', '');
var talkUrl = talkTab.attr('href').replace('index.php?title=', '').replace(namespace, 'User').replace('&action=edit&redlink=1', '');
var subIndex = talkUrl.indexOf('/', 1);
var subIndex = talkUrl.indexOf('/', 0);
if (subIndex > 0)
if (subIndex > 0)
talkUrl = talkUrl.substring(0, subIndex);
talkUrl = talkUrl.substring(0, subIndex);