diff --git a/web_src/js/features/repo-release.js b/web_src/js/features/repo-release.js index efa1f1ad4..3784bed2b 100644 --- a/web_src/js/features/repo-release.js +++ b/web_src/js/features/repo-release.js @@ -2,14 +2,14 @@ import {hideElem, showElem} from '../utils/dom.js'; import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js'; export function initRepoRelease() { - [...document.querySelectorAll('.remove-rel-attach')].forEach((el) => { + for (const el of document.querySelectorAll('.remove-rel-attach')) { el.addEventListener('click', (e) => { const uuid = e.target.getAttribute('data-uuid'); const id = e.target.getAttribute('data-id'); document.querySelector(`input[name='attachment-del-${uuid}']`).value = 'true'; hideElem(`#attachment-${id}`); }); - }); + } } export function initRepoReleaseNew() { diff --git a/web_src/js/standalone/forgejo-swagger.js b/web_src/js/standalone/forgejo-swagger.js index b565827b3..2419bdb3c 100644 --- a/web_src/js/standalone/forgejo-swagger.js +++ b/web_src/js/standalone/forgejo-swagger.js @@ -5,7 +5,7 @@ window.addEventListener('load', async () => { const url = document.getElementById('swagger-ui').getAttribute('data-source'); const ui = SwaggerUI({ - url: url, + url, dom_id: '#swagger-ui', deepLinking: true, docExpansion: 'none',