aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-03-04 17:03:37 +0000
committerMario <mario@mariovavti.com>2023-03-04 17:03:37 +0000
commit9f10e7e3562dfa161962439fe117e11ba42e6875 (patch)
tree99b9729c32c8bb64a52c3eeb7fe1021c9484b35d /view/theme/redbasic/js
parentdc6075aa3f91ad8e96f440f0569cfe5bd862b201 (diff)
downloadvolse-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.js12
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');
});
}