diff --git a/client/scripts/mobileconsole.js b/client/scripts/mobileconsole.js index 1640957..0bb689d 100644 --- a/client/scripts/mobileconsole.js +++ b/client/scripts/mobileconsole.js @@ -345,7 +345,7 @@ var mobileConsole = (function () { top: 'auto', right: 0, width: '100%', - zIndex: 10000, + zIndex: 1000000, padding: 0, paddingBottom: options.browserinfo.isMobile ? '35px' : '25px', margin: 0, diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php index eff69fd..8aac478 100644 --- a/client/scripts/regatten.js.php +++ b/client/scripts/regatten.js.php @@ -436,3 +436,25 @@ var onDatabaseLoaded = function() { onServiceWorkerLoaded(); initPushSettings(); } + +// Add console opener to preloader +var addConsoleOpenerToPreloader = function() { + addConsoleOpenerToPreloader = function(){}; + var preloader = document.getElementById('preloader'); + var button = document.createElement('a'); + button.href = '#'; + button.classList = 'btn btn-full rounded-s text-uppercase font-900 shadow-m bg-highlight m-3'; + button.style.position = 'fixed'; + button.style.bottom = 0; + button.style.left = 0; + button.style.right = 0; + button.innerHTML = 'Show Console'; + button.onclick = function(){ + mobileConsole.displayConsole(); + return false; + } + setTimeout(function(){ + preloader.appendChild(button); + }, 5000); +} +addConsoleOpenerToPreloader();