diff options
author | sgiehl <stefan@piwik.org> | 2015-05-20 01:20:56 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-05-20 01:20:56 +0300 |
commit | 2d8064981f20089a800c068fed72c7b48a75f7db (patch) | |
tree | f4ae19a8bc8a2f3e469e15cd6f6bf3fc520259aa /js/piwik.js | |
parent | edd2bfbcdae386378a78e52b414cf14f9df59440 (diff) |
fixes #7941 - take device pixel ratio into account when detecting screen resolution
Diffstat (limited to 'js/piwik.js')
-rw-r--r-- | js/piwik.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/js/piwik.js b/js/piwik.js index 8d1a735e32..153353eed4 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -4022,7 +4022,7 @@ if (typeof Piwik !== 'object') { gears: 'application/x-googlegears', ag: 'application/x-silverlight' }, - devicePixelRatio = (new RegExp('Mac OS X.*Safari/')).test(navigatorAlias.userAgent) ? windowAlias.devicePixelRatio || 1 : 1; + devicePixelRatio = windowAlias.devicePixelRatio || 1; // detect browser features except IE < 11 (IE 11 user agent is no longer MSIE) if (!((new RegExp('MSIE')).test(navigatorAlias.userAgent))) { @@ -4054,8 +4054,6 @@ if (typeof Piwik !== 'object') { } // screen resolution - // - only Apple reports screen.* in device-independent-pixels (dips) - // - devicePixelRatio is always 2 on MacOSX+Retina regardless of resolution set in Display Preferences browserFeatures.res = screenAlias.width * devicePixelRatio + 'x' + screenAlias.height * devicePixelRatio; } |