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

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

跳转到导航 跳转到搜索
删除21字节 、​ 2020年12月30日 (三) 07:34
无编辑摘要
lineWrapping: true, lineNumbers: true});
wrapper = $( editor.getWrapperElement() ).toggle();
const scroller = $( editor.getScrollerElement() );
$('<div>', {id: 'inspector-btns', html: btns.map(function(ele) { return ele.$element; })}).appendTo( outer );
$('.diff').click(function(e) {
isLineno = row.children( '.diff-lineno' ).length ? 1 : 0,
rowLineno = isLineno ? row : row.prevAll( ':has(.diff-lineno)' ).first(),
n = parseInt( rowLineno.children().last().text().match(/\d+/) ), + row.index() - rowLineno.index()
line- = scroller.find( '.CodeMirror-linenumber'2 ).filter(function()+ {isLineno,
return this.textContentnLine == n + roweditor.indexlastLine() - rowLineno.index() - 1 + isLineno;
if (nLine >= }n); {
editor.scrollIntoView(nLine);
if (line.length) { scroller.animate({scrollTop: line.offset().top - scroller.offset().top - 4}); }
editor.scrollIntoView(n);
}
else { mw.notify( wgULS('当前不存在该行!', '當前不存在該行!'), {type: 'warn'} ); }
});
}, function(reason) { mw.apiFailure(reason, 'CodeMirror' + wgULS('设置或页面', '設置或頁面') + 'Wikitext'); });
16,874

个编辑

导航菜单