Pārlūkot izejas kodu

Add mobile override mode

Fixes #1157
Jed Fox 5 gadi atpakaļ
vecāks
revīzija
2beb46db42
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  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