Browse Source

Add mobile override mode

Fixes #1157
Jed Fox 5 years ago
parent
commit
2beb46db42
1 changed files with 2 additions and 0 deletions
  1. 2 0
      assets/javascripts/views/layout/mobile.coffee

+ 2 - 0
assets/javascripts/views/layout/mobile.coffee

@@ -14,6 +14,8 @@ class app.views.Mobile extends app.View
     after: 'afterRoute'
 
   @detect: ->
+    if Cookies.get('override-mobile-detect')?
+      return JSON.parse Cookies.get('override-mobile-detect')
     try
       (window.matchMedia('(max-width: 480px)').matches) or
       (window.matchMedia('(max-width: 767px)').matches) or