Use images off CDN

This commit is contained in:
blob8108 2013-06-02 09:49:30 +01:00
parent df2ceb706a
commit fe96cf8d42
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,9 @@ function sigFetchProfile ($username) {
// Fetch page // Fetch page
$data = file_get_contents("http://scratch.mit.edu/site-api/users/all/$username/"); $data = file_get_contents("http://scratch.mit.edu/site-api/users/all/$username/");
$json = json_decode($data, $assoc=true); $json = json_decode($data, $assoc=true);
return $json['thumbnail_url']; $pk = $json['user']['pk'];
$image_url = "http://cdn.scratch.mit.edu/get_image/user/{$pk}_18x18.png";
return $image_url;
} }

View file

@ -3,7 +3,5 @@
} }
.scratch-sig img { .scratch-sig img {
width: 1.25em;
height: 1.25em;
border: 1px solid #aaa; border: 1px solid #aaa;
} }