gitea/modules/markup
wxiaoguang 27bf63ad20
Refactor global init code and add more comments (#33755)
Follow up #33748

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.
2025-03-03 10:57:28 +08:00
..
asciicast Refactor context repository (#33202) 2025-01-12 03:39:46 +00:00
common Update go tool dependencies (#32916) 2024-12-19 19:17:55 +01:00
console Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
csv Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
external Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
internal Refactor HTMLFormat, update chroma render, fix js error (#33136) 2025-01-08 03:44:32 +00:00
markdown Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
mdstripper
orgmode Refactor HTMLFormat, update chroma render, fix js error (#33136) 2025-01-08 03:44:32 +00:00
camo.go
camo_test.go
html.go chore: fix some trivial problems and TODOs (#33473) 2025-02-02 18:16:56 +00:00
html_codepreview.go Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
html_codepreview_test.go Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
html_commit.go Add sub issue list support (#32940) 2024-12-24 01:54:19 +00:00
html_email.go
html_emoji.go
html_internal_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
html_issue.go Add sub issue list support (#32940) 2024-12-24 01:54:19 +00:00
html_issue_test.go Add sub issue list support (#32940) 2024-12-24 01:54:19 +00:00
html_link.go Refactor "string truncate" (#32984) 2024-12-26 11:56:03 +08:00
html_mention.go Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
html_node.go Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
html_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
main_test.go Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
render.go Refactor context repository (#33202) 2025-01-12 03:39:46 +00:00
render_helper.go Add sub issue list support (#32940) 2024-12-24 01:54:19 +00:00
render_link.go Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
render_link_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
renderer.go Refactor markup render system (#32612) 2024-11-24 16:18:57 +08:00
renderer_test.go
sanitizer.go
sanitizer_custom.go
sanitizer_default.go Fix "stop time tracking button" on navbar (#33084) 2025-01-03 04:01:05 +08:00
sanitizer_default_test.go Refactor global init code and add more comments (#33755) 2025-03-03 10:57:28 +08:00
sanitizer_description.go
sanitizer_description_test.go