loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove jQuery class from the comment edit history (#30186)

- Switched from jQuery class functions to plain JavaScript `classList`
- Tested the comment edit history functionality and it works as before

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 6aeff21b76fcbb10d5ce9009ed4243c14633d899)

authored by

Yarden Shoham
Giteabot
and committed by
Gergely Nagy
936448e1 bd141989

+5 -2
+5 -2
web_src/js/features/repo-issue-content.js
··· 2 2 import {svg} from '../svg.js'; 3 3 import {showErrorToast} from '../modules/toast.js'; 4 4 import {GET, POST} from '../modules/fetch.js'; 5 + import {showElem} from '../utils/dom.js'; 5 6 6 7 const {appSubUrl} = window.config; 7 8 let i18nTextEdited; ··· 73 74 const response = await GET(url); 74 75 const resp = await response.json(); 75 76 76 - $dialog.find('.comment-diff-data').removeClass('is-loading').html(resp.diffHtml); 77 + const commentDiffData = $dialog.find('.comment-diff-data')[0]; 78 + commentDiffData?.classList.remove('is-loading'); 79 + commentDiffData.innerHTML = resp.diffHtml; 77 80 // there is only one option "item[data-option-item=delete]", so the dropdown can be entirely shown/hidden. 78 81 if (resp.canSoftDelete) { 79 - $dialog.find('.dialog-header-options').removeClass('tw-hidden'); 82 + showElem($dialog.find('.dialog-header-options')); 80 83 } 81 84 } catch (error) { 82 85 console.error('Error:', error);