Skip to content

Instantly share code, notes, and snippets.

@chenkaie
Created May 6, 2012 14:23
Show Gist options
  • Save chenkaie/2622512 to your computer and use it in GitHub Desktop.
Save chenkaie/2622512 to your computer and use it in GitHub Desktop.
commentPhotoDo
<script type='text/javascript'>
//<![CDATA[
var times= 0;
function commentPhotoDo() {
var tag;
for(var i = 0; i < commentPhotoIds.length; i++){
tag = document.createElement('script');
tag.type = 'text/javascript';
tag.src = 'http://chenkaie.110mb.com/avatar.php?maxheight=60&url='+encodeURIComponent(commentPhotoIds[i].url)+'&id='+encodeURIComponent(commentPhotoIds[i].id)+'&defaultimage='+encodeURIComponent('http://bloggerhacks.googlecode.com/files/No_Photo.PNG');
//tag.src = 'http://bloggerhacks.googlecode.com/files/No_Photo.PNG)';
document.body.appendChild(tag);
//if(i >= commentPhotoIds.length-1) break;
}//end for var i in commentPhotoIds
}//end function commentPhotoDo
if(typeof(commentPhotoIds) != "undefined") commentPhotoDo();
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment