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

添加119字节 、​ 2020年12月28日 (一) 13:48
无编辑摘要
cssHide.disabled = true;
var dialog, actionP, actionD, text, editor, wrapper, nextid;
const resize$content = $('#mw.resizeLyrics-content-text, || function#mw-imagepage-content').last() {},
$content = $('#mw-content-text, #mw-imagepage-content').last(),
original = $content.children( '.mw-parser-output' ),
placeholder = $('<div>', {class: "mw-parser-output"}).css('display', 'none'),
});
});
// 先于或后于[[Widget:Lyrics]]执行都不要紧
resize();
(mw.resizeLyrics || function() {})();
const btns = [new OO.ui.ButtonWidget({label: '提交', flags: ['primary', 'progressive']}).on('click', function() {
btns[0].setDisabled( true );
if ($.contains( $content[0], original[0] )) { original.after( placeholder ).detach(); }
$content.children( '.mw-parser-output' ).replaceWith( html );
resize(mw.resizeLyrics || function() {})();
mw.hook( 'wikipage.content' ).fire($content);
}, function(reason) { mw.apiFailure(reason, wgULS('预览', '預覽')); }).then(function() {
editor.setValue( text );
$content.children( '.mw-parser-output' ).replaceWith( original );
resize(mw.resizeLyrics || function() {})();
}), new OO.ui.ButtonWidget({label: wgULS('隐藏', '隱藏')}).on('click', function() {
css.disabled = !css.disabled;
wrapper.toggle();
btns[3].setLabel( css.disabled ? wgULS('显示', '顯示') : wgULS('隐藏', '隱藏'));
resize(mw.resizeLyrics || function() {})();
}), new OO.ui.ButtonWidget({flags: 'progressive', icon: 'next'})],
list = mw.storage.getObject( 'inspect-category' );
16,874

个编辑