User:PanchamBro/common.js

// // Link to module dependencies // Author: RheingoldRiver // License: CC BY-SA 3.0 // Source: https://lol.fandom.com/wiki/MediaWiki:Common.js#L-28 // $(function {   if (mw.config.get('wgCanonicalNamespace') != 'Module') return;    $('.s1, .s2').each(function { var html = $(this).html; var quote = html[0]; var quoteRE = new RegExp('^' + quote + '|' + quote + '$', 'g'); var name = html.replace(quoteRE,""); if (name.startsWith("Module:")) { var target = name.replace(/ /g,'%20'); var url = mw.config.get('wgServer') + '/wiki/' + target; var str = quote + '' + name + '' + quote; $(this).html(str); }   }); });