Parcourir la source

#4382 Remove #dpr from URL when site is initially loading

Alex Trofimov il y a 3 ans
Parent
commit
08c8080292
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1 3
      template/_header_js.html

+ 1 - 3
template/_header_js.html

@@ -9,11 +9,9 @@
 
     (function(w) {
         var dpr = (w.devicePixelRatio === undefined ? 1 : Math.round(w.devicePixelRatio));
-        if ($.cookie('devicePixelRatio') == dpr || dpr < 2 || (typeof(bIgnorePixelRatio) != "undefined" && bIgnorePixelRatio) || !navigator.cookieEnabled || '#dpr' === window.location.hash) 
+        if ($.cookie('devicePixelRatio') == dpr || dpr < 2 || (typeof(bIgnorePixelRatio) != "undefined" && bIgnorePixelRatio) || !navigator.cookieEnabled) 
             return;
         $.cookie('devicePixelRatio', dpr, {expires: 365, path: '/'});
-        if (!window.location.hash.length)
-            window.location.hash = 'dpr';
         window.location.reload();
     })(window);