Difference between revisions of "MediaWiki:Common.js"

From Taskman Wiki
Jump to navigation Jump to search
(Created page with "#Replace linkline spans with individual links $("span.mw-linkline").each(function(index) { let replaceString = $(this).data("format"); $(this).html($(this).html().replace(...")
(No difference)

Revision as of 12:56, 15 May 2020

#Replace linkline spans with individual links
$("span.mw-linkline").each(function(index) {
  let replaceString = $(this).data("format");
  $(this).html($(this).html().replace(/(.+?)(<br>|$)/g, `<a href="${replaceString}">$1</a>$2`));
});