diff --git a/js/glowingbear.js b/js/glowingbear.js
index ba68d2f..1fbebbd 100644
--- a/js/glowingbear.js
+++ b/js/glowingbear.js
@@ -486,6 +486,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
         });
     }
 
+    var mobile_cutoff = 968;
 
     $rootScope.countWatchers = function () {
         var root = $(document.getElementsByTagName('body'));
@@ -614,34 +615,35 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
 
     // If we are on mobile chhange some defaults
     // We use 968 px as the cutoff, which should match the value in glowingbear.css
-    if (document.body.clientWidth < 968) {
+    if (document.body.clientWidth < mobile_cutoff) {
         $scope.nonicklist = true;
         $scope.noembed = true;
         $scope.notimestamp = true;
     }
-	// Open and close panels while on mobile devices through swiping
-	$scope.swipeSidebar = function() { 
-	        if (document.body.clientWidth < 968) {
+    // Open and close panels while on mobile devices through swiping
+    $scope.swipeSidebar = function() { 
+
+        if (document.body.clientWidth < 968) {
             $('#sidebar').collapse('toggle');
         }
-	};
-	
-	
-	$scope.openNick = function() {
-		if (document.body.clientWidth < 968) {
-			if($scope.nonicklist) { 
-				$scope.nonicklist = false;
-			} 
-		}
-	};
+    };
+    
+    
+    $scope.openNick = function() {
+        if (document.body.clientWidth < 968) {
+            if($scope.nonicklist) { 
+                $scope.nonicklist = false;
+            } 
+        }
+    };
 
-	$scope.closeNick = function() {
-		if (document.body.clientWidth < 968) {
-			if(!$scope.nonicklist) { 
-				$scope.nonicklist = true;
-			} 
-		}
-	};
+    $scope.closeNick = function() {
+        if (document.body.clientWidth < 968) {
+            if(!$scope.nonicklist) { 
+                $scope.nonicklist = true;
+            } 
+        }
+    };
 
     // Watch model and update show setting when it changes
     $scope.$watch('noembed', function() {
@@ -657,7 +659,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
     $scope.setActiveBuffer = function(bufferId, key) {
         // If we are on mobile we need to collapse the menu on sidebar clicks
         // We use 968 px as the cutoff, which should match the value in glowingbear.css
-        if (document.body.clientWidth < 968) {
+        if (document.body.clientWidth < mobile_cutoff) {
             $('#sidebar').collapse('toggle');
         }
         return models.setActiveBuffer(bufferId, key);