Skip to content

Commit 4373ad1

Browse files
committed
remove jQuery
1 parent 67026e1 commit 4373ad1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

web_src/js/features/citation.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export async function initCitationFileCopyContent() {
3030
const citationCopyApa = document.querySelector<HTMLButtonElement>('#citation-copy-apa');
3131
const citationCopyBibtex = document.querySelector<HTMLButtonElement>('#citation-copy-bibtex');
3232
const inputContent = document.querySelector<HTMLInputElement>('#citation-copy-content');
33-
const modal = fomanticQuery('#cite-repo-modal');
33+
const elModal = document.querySelector<HTMLElement>('#cite-repo-modal');
34+
const $modal = fomanticQuery('#cite-repo-modal');
3435

3536
if ((!citationCopyApa && !citationCopyBibtex) || !inputContent) return;
3637

@@ -43,8 +44,8 @@ export async function initCitationFileCopyContent() {
4344
};
4445

4546
document.querySelector('#cite-repo-button')?.addEventListener('click', async () => {
46-
modal.modal('show');
47-
modal.addClass('is-loading');
47+
$modal.modal('show');
48+
elModal.classList.add('is-loading');
4849

4950
try {
5051
try {
@@ -69,7 +70,7 @@ export async function initCitationFileCopyContent() {
6970
inputContent.select();
7071
});
7172
} finally {
72-
modal.removeClass('is-loading');
73+
elModal.classList.remove('is-loading');
7374
}
7475
});
7576
}

0 commit comments

Comments
 (0)