LLWiki正在建设中,欢迎加入我们

“User:Bhsd/minerva.js”的版本间差异

跳转到导航 跳转到搜索
标签移动版网页编辑 移动版编辑
标签移动版网页编辑 移动版编辑
mw.loader.using( 'mediawiki.util' ).then(function() {
// console
if (mw.util.getParamValue( 'vconsole' )) {
$('<div>', {id: "__vconsole", html: $('<div>', {class: "vc-switch", text: "vConsole"})}).insertAfter( 'body' )
.click(function() {
$(this).remove();
mw.loader.getScript( 'https://cdn.jsdelivr.net/npm/vconsole@3.3.4/dist/vconsole.min.js' )
.then(function() {
$('.vc-cmd-input').replaceWith( $('<textarea>', {class: 'vc-cmd-input'}) );
});
});
else {
$('<div>', {id: "__vconsole", html: $('<div>', {class: "vc-switch", text: "vConsole"})}).insertAfter( 'body' )
.click(function() {
const href = location.href;
location.href = href + (href.includes( '?' ) ? '&' : '?') + 'vconsole=1';
});
}
 
const nsid = mw.config.get( 'wgNamespaceNumber' ),