feat(place-order): Adds a mobile device test

This commit is contained in:
sovanna 2019-11-07 19:15:47 +09:00
parent ede2829c92
commit 9646cba6c2

View File

@ -16,6 +16,20 @@
{% 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. -->
<!-- Note: when deploying, replace "development.js" with "production.min.js". -->
<!-- v16 -->