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

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

跳转到导航 跳转到搜索
添加265字节 、​ 2021年2月5日 (五) 22:35
无编辑摘要
// 由于resizable,left, top, height必须加!important,width不可加!important
cssHide = mw.util.addCSS( `#inspector { position:fixed; bottom:0; right:24px; left:unset !important;
top:unset !important; height:unset !important; width:calc(50% - 7rem - 0.5px); }` ),
.start-screen { bottom:40px; }` ),
$content = $('#mw-content-text, #mw-imagepage-content').last(),
// wikitext/Scribunto对应.mw-parser-output,javascript/css对应.mw-code,json对应.mw-json
// 生成通用的API请求
mw.standardQuery(api);
let text, editor, $wrapper, $replace, $charinsert, prefix, ns, section, secTitle, summary,
lang = mw.config.get( 'wgUserVariant' );
$original.find( ':header:has(.mw-editsection)' ).dblclick(function() {
btns[0].setDisabled( true );
mw.safeEdit(api, curRevid, {pageid: id, text: editor.getValue(), section: section,
summary: (section === undefined ? '' : `/* ${secTitle} */ `) + `${summary || ''}//`) +
wgULS( '使用[[help:小工具/页面文本对比查看器|页面/文本对比查看器]]快速编辑',
'使用[[help:小工具/页面文本对比查看器|頁面/文本對比察看器]]快速編輯')}, isBackup)
});
$('body').click(() => { $dropdown.slideUp('fast'); });
btns[0].$element.contextmenu(e => {
e.preventDefault();
OO.ui.prompt( '请输入编辑摘要:' , {textInput: {value: summary}} ).then(input => { summary = input; });
});
if (isBackup) {
btns[2].$element.contextmenu(e => {
16,874

个编辑

导航菜单