use high resolution avatars on highdpi screens

This commit is contained in:
Robin Appelman 2014-04-04 23:35:32 +02:00
parent 710bbd3491
commit 3c35e82a37
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@
var url = OC.generateUrl(
'/avatar/{user}/{size}?requesttoken={requesttoken}',
{user: user, size: size, requesttoken: oc_requesttoken});
{user: user, size: size * window.devicePixelRatio, requesttoken: oc_requesttoken});
$.get(url, function(result) {
if (typeof(result) === 'object') {
@ -93,9 +93,9 @@
} else {
$div.show();
if (ie8fix === true) {
$div.html('<img src="'+url+'#'+Math.floor(Math.random()*1000)+'">');
$div.html('<img width="' + size + '" height="' + size + '" src="'+url+'#'+Math.floor(Math.random()*1000)+'">');
} else {
$div.html('<img src="'+url+'">');
$div.html('<img width="' + size + '" height="' + size + '" src="'+url+'">');
}
}
if(typeof callback === 'function') {