forked from M-Labs/web2019
feat(place-order): Adds a mobile device test
This commit is contained in:
parent
ede2829c92
commit
9646cba6c2
|
@ -16,6 +16,20 @@
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
function deviceIsMobile() {
|
||||||
|
// https://coderwall.com/p/i817wa/one-line-function-to-detect-mobile-devices-with-javascript
|
||||||
|
return (typeof window.orientation !== 'undefined') || (navigator.userAgent.indexOf('IEMobile') !== -1);
|
||||||
|
};
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
<!-- Load React. -->
|
<!-- Load React. -->
|
||||||
<!-- Note: when deploying, replace "development.js" with "production.min.js". -->
|
<!-- Note: when deploying, replace "development.js" with "production.min.js". -->
|
||||||
<!-- v16 -->
|
<!-- v16 -->
|
||||||
|
|
Loading…
Reference in New Issue