diff options
author | Mario <mario@mariovavti.com> | 2023-03-04 17:03:37 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-03-04 17:03:37 +0000 |
commit | 9f10e7e3562dfa161962439fe117e11ba42e6875 (patch) | |
tree | 99b9729c32c8bb64a52c3eeb7fe1021c9484b35d /view/theme/redbasic/js | |
parent | dc6075aa3f91ad8e96f440f0569cfe5bd862b201 (diff) | |
download | volse-hubzilla-9f10e7e3562dfa161962439fe117e11ba42e6875.tar.gz volse-hubzilla-9f10e7e3562dfa161962439fe117e11ba42e6875.tar.bz2 volse-hubzilla-9f10e7e3562dfa161962439fe117e11ba42e6875.zip |
simplify pageloader animation
Diffstat (limited to 'view/theme/redbasic/js')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index b502ad333..706bf2808 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -26,14 +26,10 @@ $(document).ready(function() { // provide a fake progress bar for pwa standalone mode if (window.matchMedia('(display-mode: standalone)').matches) { $(window).on('beforeunload', function(){ - $('<div style="position:fixed; z-index:10000; height:2px;" class="bg-primary page-loader"></div>').prependTo('body'); - let w = 10; - setInterval(function () { - $('.page-loader').css('width', w + 'vw'); - if (w < 90) { - w = w+2; - } - }, 10); + if ($('.page-loader').length) { + return; + } + $('<div class="bg-primary page-loader"></div>').prependTo('body'); }); } |