      // Hack for ios Safari browser (UI overlapping on iOS 10)
      var userAgent = window.navigator.userAgent;
      var regEx = /iP(hone|od|ad)/;
      var iOS = regEx.test(userAgent);
      var webkit = /WebKit/i.test(userAgent);
      var criOS = /CriOS/i.test(userAgent);
      var platform = regEx.test(window.navigator.platform);

      if(iOS && webkit && platform && !criOS && !window.MSStream) {
        function iosChecker() {
          var v = (window.navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
          return [parseInt(v[1], 10), parseInt(v  [2], 10), parseInt(v[3] || 0, 10)];
        }

        var iosVersion = iosChecker()[0];
        if (iosVersion >= 10) {
          var interval = setInterval(function () {
            if($('div.ol-zoom').get(0)) {
              clearInterval(interval);
              $('button.gmf-mobile-nav-left-trigger').addClass('ios-margin-top');
              $('button.gmf-mobile-nav-right-trigger').addClass('ios-margin-top');
              $('gmf-search').addClass('ios-margin-top');
              $('div.ol-zoom').addClass('ios-zoom-btn');
              $('div.ol-rotate').addClass('ios-rotate-btn');
              $('button[ngeo-mobile-geolocation]').addClass('ios-geolocation-btn');
            }
          }, 100);
        }
      }
@@ -1,14 +1,8 @@
-      
 // Hack 
@@ -51,25 +51,21 @@
 iOS 10)%0A
-      var
+const
  userAge
@@ -97,25 +97,21 @@
 rAgent;%0A
-      var
+const
  regEx =
@@ -129,25 +129,21 @@
 d%7Cad)/;%0A
-      var
+const
  iOS = r
@@ -164,25 +164,21 @@
 Agent);%0A
-      var
+const
  webkit 
@@ -210,32 +210,47 @@
 t);%0A
-      var criOS = /CriOS
+const chromeiOS = /(Chrome%7CCriOS%7COPiOS)
 /i.t
@@ -265,25 +265,21 @@
 Agent);%0A
-      var
+const
  platfor
@@ -326,121 +326,47 @@
 );%0A%0A
-      if(iOS && webkit && platform && !criOS && !window.MSStream) %7B%0A        function iosChecker() %7B%0A          var
+const iosChecker = function() %7B%0A  const
  v =
@@ -429,24 +429,16 @@
 d+)?/);%0A
-        
   return
@@ -511,30 +511,308 @@
 )%5D;%0A
-        %7D%0A%0A        var
+%7D;%0A%0A/**%0A* iOS is true on iOS or emulators (user-agent)%0A* webkit is true on Safari/Chrome, etc%0A* platform is true on iOS, not emulator (platform)%0A* chromeiOS is true on other browsers (chrome/opera)%0A* MSStream is true on IE%0A*/%0Aif (iOS && webkit && platform && !chromeiOS && !window.MSStream) %7B%0A  const
  ios
@@ -838,22 +838,16 @@
 r()%5B0%5D;%0A
-      
   if (io
@@ -872,17 +872,13 @@
     
-      var
+const
  int
@@ -901,36 +901,24 @@
 val(
-function () %7B%0A      
+() =%3E %7B%0A
       if
 ($('
@@ -913,16 +913,17 @@
       if
+ 
 ($('div.
@@ -950,22 +950,16 @@
         
- 
-     
 clearInt
@@ -975,38 +975,32 @@
 erval);%0A        
-    
-  
 $('button.gmf-mo
@@ -1051,38 +1051,32 @@
 -top');%0A        
-   
-   
 $('button.gmf-mo
@@ -1136,22 +1136,16 @@
         
-  
-    
 $('gmf-s
@@ -1180,38 +1180,32 @@
 -top');%0A        
-     
- 
 $('div.ol-zoom')
@@ -1223,38 +1223,32 @@
 ios-zoom-btn');%0A
-      
         $('div.o
@@ -1294,22 +1294,16 @@
         
-   
-   
 $('butto
@@ -1368,22 +1368,16 @@
 ');%0A
-      
       %7D%0A
     
@@ -1372,22 +1372,16 @@
       %7D%0A
-      
     %7D, 1
@@ -1391,19 +1391,8 @@
 ;%0A  
-      %7D%0A      %7D
+%7D%0A%7D%0A

Fix syntax