Fix #72 - make side-panel button depend on screen size, same as the appearance

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2023-07-26 11:53:27 +08:00
parent 1dd336385f
commit dceac25866
1 changed files with 4 additions and 18 deletions

View File

@ -26,26 +26,12 @@
<script> <script>
(function () { (function () {
function deviceIsMobile() { function deviceIsMobile() {
// https://coderwall.com/p/i817wa/one-line-function-to-detect-mobile-devices-with-javascript // Do not rely on User-Agent: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
return ( // Be in sync with css/order-hardware.css
(typeof window.orientation !== 'undefined') || return window.innerWidth < 768;
navigator.userAgent.match(/Android/i) || }
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPad/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/i) ||
navigator.userAgent.match(/Windows Phone/i) ||
(navigator.userAgent.indexOf('IEMobile') !== -1)
);
};
window.deviceIsMobile = deviceIsMobile; window.deviceIsMobile = deviceIsMobile;
return;
if (deviceIsMobile()) {
alert('The online crate configuration tool is not available for mobile browsers yet. Please use a desktop computer or email us at sales@m-l****.hk to get a quote.');
}
})(); })();
</script> </script>