MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary Tags: Mobile edit Mobile web edit |
||
| Line 11: | Line 11: | ||
$.getScript('https://code.jquery.com/jquery-migrate-1.4.1.js'); | $.getScript('https://code.jquery.com/jquery-migrate-1.4.1.js'); | ||
$.getScript('https://cdn.jsdelivr.net/npm/[email protected]/ansi_up.min.js', function() { | var nfo = $('.nfo'); | ||
if (nfo.length) { | |||
$.getScript('https://cdn.jsdelivr.net/npm/[email protected]/ansi_up.min.js', function () { | |||
if (typeof AnsiUp === 'undefined') { | |||
return; | |||
} | |||
var $v = $( | var ansi_up = new AnsiUp; | ||
$v.html(ansi_up.ansi_to_html($v.text().replaceAll( | nfo.each(function () { | ||
var $v = $(this); | |||
$v.html(ansi_up.ansi_to_html($v.text().replaceAll('\uFFFD[', '\u001B['))); | |||
}); | }); | ||
}); | }); | ||
} | |||
mw.loader.load( '/w/resources/assets/form_prototype.js' ); | mw.loader.load( '/w/resources/assets/form_prototype.js' ); | ||