gitea/web_src/js
wxiaoguang 27bf63ad20
Refactor global init code and add more comments ()
Follow up 

Now there are 3 "global" functions:

* registerGlobalSelectorFunc: for all elements matching the selector, eg: `.ui.dropdown`
* registerGlobalInitFunc: for `data-global-init="initInputAutoFocusEnd"`
* registerGlobalEventFunc: for `data-global-click="onCommentReactionButtonClick"`


And introduce `initGlobalInput` to replace old `initAutoFocusEnd` and
`attachDirAuto`, use `data-global-init` to replace fragile
`.js-autofocus-end` selector.

Another benefit is that by the new approach, no matter how many times
`registerGlobalInitFunc` is called, we only need to do one
"querySelectorAll" in the last step, it could slightly improve the
performance.
..
components Use `git diff-tree` for `DiffFileTree` on diff pages ()
features Refactor global init code and add more comments ()
markup Enable Typescript `noImplicitAny` ()
modules Refactor global init code and add more comments ()
render Fix a number of Typescript issues ()
standalone Enable Typescript `noImplicitAny` ()
utils Refactor global init code and add more comments ()
vendor Fix areYouSure confirm ()
webcomponents Enable Typescript `noImplicitAny` ()
bootstrap.test.ts Convert frontend code to typescript ()
bootstrap.ts Add types to fetch,toast,bootstrap,svg ()
globals.d.ts Refactor repo-new.ts ()
globals.ts Convert frontend code to typescript ()
htmx.ts Enable Typescript `strictFunctionTypes` ()
index.ts Refactor global init code and add more comments ()
svg.test.ts Remove "class-name" from svg icon ()
svg.ts Remove "class-name" from svg icon ()
types.ts Enable Typescript `noImplicitAny` ()
utils.test.ts Use `git diff-tree` for `DiffFileTree` on diff pages ()
utils.ts Use `git diff-tree` for `DiffFileTree` on diff pages ()
vitest.setup.ts Fix a number of Typescript issues ()