Disable map sleep in chrome

This commit is contained in:
vjrj 2018-01-25 15:54:27 +01:00
parent ce18aab493
commit 5cf985aada
4 changed files with 8 additions and 4 deletions

View file

@ -4,3 +4,5 @@ import isMobile from 'ismobilejs';
export const isHomeAndMobile = (window.location.pathname === '/' && isMobile.any);
export const isNotHomeAndMobile = !isHomeAndMobile;
export const isAnyMobile = isMobile.any;
// https://stackoverflow.com/questions/18625321/detect-webkit-browser-in-javascript
export const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);