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:
commit
4af6f07ce1
@ -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>
|
Loading…
Reference in New Issue
Block a user