“MediaWiki:Gadget-site-shared.js”的版本间差异

无编辑摘要
$content.find( '.mw-highlight > pre' ).last().html(function() {
const ele = $(this);
if (ele.text().startsWith( '--&gt;>' ) && ele.text().endsWith( '&lt;<!--\n' )) {
const text = ele.html(),
i = text.lastIndexOf( '&lt;!--' );
return (text.slice(0, i) + text.slice(i + 7)).replace(/--&gt;/, '');
}
if (ele.text().startsWith( '&lt;</noinclude&gt;>' ) && ele.text().endsWith( '&lt;/<noinclude&gt;>\n' )) {
ele.children( '.nt:first-of-type, .nt:last-of-type, .p:first-of-type, .p:last-of-type' ).remove();
const text = ele.html(),
i = text.lastIndexOf( '&lt;' );
16,874

个编辑