16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
小 |
小 |
||
/* 引自[[moegirl:mediawiki:gadget-code-prettify.js]] */
mw.hook('wikipage.content').add( function($content) {
"js": "javascript",
"javascript": "javascript",
"css": "css",
"scribunto": "lua",
"lua": "lua",
"html": "html"
}
if (wgPageContentModel in acceptsLangs) {
$content.find('.mw-code').addClass( 'hljs linenums ' + acceptsLangs[wgPageContentModel] );
$content.find('pre[lang], code[lang]').each(function() {
var self = $(this),
if ( self.is('pre') ) { self.addClass("linenums"); }
}
});
if ($content.find('.hljs').length
▲ mw.loader.getScript('/zh?title=user:bhsd/code-prettify.js&action=raw&ctype=text/javascript').then(function() {
▲ });
}
});
|