Skip to content

Commit

Permalink
#4382 Remove #dpr from URL when site is initially loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Trofimov committed Aug 16, 2023
1 parent 8f5400a commit 08c8080
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions template/_header_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 08c8080

Please sign in to comment.