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:
@ -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 () {
|
||||
|
Reference in New Issue
Block a user