1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-08 03:27:19 +00:00

Optimize the calling code of queryElems (#34235)

This commit is contained in:
Kerwin Bryant
2025-04-19 08:17:07 +08:00
committed by GitHub
parent 21b43fce08
commit aeb7005245
8 changed files with 11 additions and 17 deletions

View File

@ -1,11 +1,8 @@
import {hideElem, queryElems, showElem} from '../utils/dom.ts';
import {initAvatarUploaderWithCropper} from './comp/Cropper.ts';
import {hideElem, showElem} from '../utils/dom.ts';
export function initUserSettings() {
if (!document.querySelector('.user.settings.profile')) return;
queryElems(document, '.avatar-file-with-cropper', initAvatarUploaderWithCropper);
const usernameInput = document.querySelector<HTMLInputElement>('#username');
if (!usernameInput) return;
usernameInput.addEventListener('input', function () {