Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
mw.hook('discordmodule.modal.show').add(function($content) {
// converts all usernames to local user: links
// for servers with wiki-verified users
// works better (only) with (window.dev = window.dev || {}).discordmodule = {usenick: true};
$content.find('.discord-member').each(function() {
var textNode = this.childNodes[1],
$textNode = $(textNode);
if (textNode.nodeType !== 3 || $(this).find('.discord-bot').length) return;// it's not the textnode u r looking for
$textNode.wrap(
$('<a>', {
href: mw.config.get('wgScriptPath') + '/wiki/User:' + textNode.textContent,
title: this.title || '',
})
);
});
});// hook