Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
// Replace linkline spans with individual links | // Replace linkline spans with individual links | ||
$("span.mw-linkline").each(function(index) { | $("span.mw-linkline").each(function(index) { | ||
− | $(this).html($(this).html().replace(/(.+?)(<br>|$)/g, '<a href="' + $(this).data("format") + '">$1</a>$2')); | + | $(this).html($(this).html().replace(/(.+?)(<br>|$)/g, '<a class="external text" href="' + $(this).data("format") + '">$1</a>$2')); |
}); | }); | ||
}); | }); |
Revision as of 13:25, 15 May 2020
$().ready(function() { // Replace linkline spans with individual links $("span.mw-linkline").each(function(index) { $(this).html($(this).html().replace(/(.+?)(<br>|$)/g, '<a class="external text" href="' + $(this).data("format") + '">$1</a>$2')); }); });