mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-10 18:53:58 +09: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