Merged in feature/MAPG-116-improve-loading-animation (pull request #90)

MAPG-116 attach loading animation to anchors and not to beforeunload
This commit is contained in:
Bence Pőcze 2020-06-09 21:01:07 +00:00
commit 4af6f07ce1

View File

@ -1,7 +1,15 @@
<script> <script>
window.addEventListener('beforeunload', function (e) { (function () {
document.getElementById('loading').style.visibility = 'visible'; var anchors = document.getElementsByTagName('a');
}); for (var i = 0; i < anchors.length; i++) {
var a = anchors[i];
if (a.target !== '_blank') {
a.onclick = function () {
document.getElementById('loading').style.visibility = 'visible';
}
}
}
})();
</script> </script>
</body> </body>
</html> </html>