overleaf/services/web/frontend/js/features/link-helpers/slow-link.js
Jakob Ackermann 011e719fdf Merge pull request #5125 from overleaf/jpa-portal-de-ng
[web] de-ng portals page

GitOrigin-RevId: 2460c51fb0f81be758c5804e66803a98b614b304
2021-09-22 08:03:41 +00:00

10 lines
265 B
JavaScript

import { inflightHelper } from '../form-helpers/hydrate-form'
function setup(el) {
inflightHelper(el)
el.addEventListener('click', function () {
el.dispatchEvent(new Event('pending'))
})
}
document.querySelectorAll('[data-ol-slow-link]').forEach(setup)