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>
|
||||
window.addEventListener('beforeunload', function (e) {
|
||||
(function () {
|
||||
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>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user