Improve "goto issue by number" button (#24577)
Follow #24479      --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
54f399c4df
commit
23ae939ef3
8 changed files with 111 additions and 39 deletions
|
@ -1,5 +1,5 @@
|
|||
import {basename, extname, isObject, isDarkTheme} from '../utils.js';
|
||||
import {debounce} from 'throttle-debounce';
|
||||
import {onInputDebounce} from '../utils/dom.js';
|
||||
|
||||
const languagesByFilename = {};
|
||||
const languagesByExt = {};
|
||||
|
@ -164,7 +164,7 @@ export async function createCodeEditor(textarea, filenameInput) {
|
|||
...getEditorConfigOptions(editorConfig),
|
||||
});
|
||||
|
||||
filenameInput.addEventListener('input', debounce(500, () => {
|
||||
filenameInput.addEventListener('input', onInputDebounce(() => {
|
||||
const filename = filenameInput.value;
|
||||
const previewable = previewableExts.has(extname(filename));
|
||||
togglePreviewDisplay(previewable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue