16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
小 |
小 |
||
// 处理页面上方的差异
$('.diff').click(e => {
const row = $( e.target ).closest('tr')
if
const 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()
|