silverwind
507fbf4c3c
Use querySelector
over alternative DOM methods ( #31280 )
...
As per
https://github.com/go-gitea/gitea/pull/30115#discussion_r1626060164 ,
prefer `querySelector` by enabling
[`unicorn/prefer-query-selector`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md )
and autofixing all except 10 issues.
According to
[this](https://old.reddit.com/r/learnjavascript/comments/i0f5o8/performance_of_getelementbyid_vs_queryselector/ ),
querySelector may be faster as well, so it's a win-win.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-06-10 22:49:33 +02:00
wxiaoguang
61b495e5ab
Fix issue label rendering in the issue popup ( #30763 )
2024-04-30 02:36:32 +00:00
Yarden Shoham
d9e33959b3
Remove jQuery from the issue "go to" button ( #30028 )
...
- Switched to plain JavaScript
- Tested the "go to" button functionality and it works as before
# Demo using JavaScript without jQuery

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2024-03-23 18:18:45 +00:00
wxiaoguang
658cbddbfb
Make submit event code work with both jQuery event and native event ( #29223 )
...
Partially related to #29200 and fix other potential bugs.
Co-authored-by: Giteabot <teabot@gitea.io>
2024-02-17 21:48:10 +01:00
wxiaoguang
6632d1497c
Polyfill SubmitEvent for PaleMoon ( #28441 )
2023-12-15 07:26:36 +08:00
silverwind
ae8e8f055e
Use fetch helpers instead of fetch ( #27026 )
...
WIP because:
- [x] Some calls set a `content-type` but send no body, can likely
remove the header
- [x] Need to check whether `charset=utf-8` has any significance on the
webauthn calls, I assume not as it is the default for json content.
- [x] Maybe `no-restricted-globals` is better for eslint, but will
require a lot of duplication in the yaml or moving eslint config to a
`.js` extension.
- [x] Maybe export `request` as `fetch`, shadowing the global.
2023-09-19 00:50:30 +00:00
wxiaoguang
23ae939ef3
Improve "goto issue by number" button ( #24577 )
...
Follow #24479





---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-10 15:50:58 +00:00