mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-23 18:18:31 +08:00
Remove jQuery from the Unicode escape button (#29369)
- Switched to plain JavaScript - Tested the Unicode escape button functionality and it works as before # Demo using JavaScript without jQuery  --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -51,6 +51,10 @@ export function isElemHidden(el) {
|
||||
return res[0];
|
||||
}
|
||||
|
||||
export function queryElemSiblings(el, selector) {
|
||||
return Array.from(el.parentNode.children).filter((child) => child !== el && child.matches(selector));
|
||||
}
|
||||
|
||||
export function onDomReady(cb) {
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', cb);
|
||||
|
Reference in New Issue
Block a user