mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-25 02:56:55 +08:00
Refactor legacy line-number and scroll code (#33094)
1. remove jquery 2. rewrite the "line number selection", fix various edge cases 3. fix the scroll
This commit is contained in:
@ -19,6 +19,7 @@ import {
|
||||
import {POST, GET} from '../modules/fetch.ts';
|
||||
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
||||
import {createTippy} from '../modules/tippy.ts';
|
||||
import {invertFileFolding} from './file-fold.ts';
|
||||
|
||||
const {pageData, i18n} = window.config;
|
||||
|
||||
@ -244,4 +245,8 @@ export function initRepoDiffView() {
|
||||
initRepoDiffFileViewToggle();
|
||||
initViewedCheckboxListenerFor();
|
||||
initExpandAndCollapseFilesButton();
|
||||
|
||||
addDelegatedEventListener(document, 'click', '.fold-file', (el) => {
|
||||
invertFileFolding(el.closest('.file-content'), el);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user