Browser-Phone
Browser-Phone copied to clipboard
custom default avatar images
Hi,
Could there please be a customizable variable that specifies the number of random avatar images in the following function?
function getPicture(buddy, typestr, ignoreCache){
var rndInt = Math.floor(Math.random() * 8) + 1;
var defaultImg = hostingPrefex + "avatars/default."+ String(rndInt) +".png";
I would like to change "8" to some other number via eg. phoneOptions because I cannot use the default avatar images and I don't have as many.
Thanks
Also, older versions of Browser-Phone had just one default.png for the avatar. I still have that avatar, and I prefer to use that instead. Can the getPicture function be modified so that if it finds default.png or if the new phoneOptions avatar variable is set to "0" then it uses just that one single image, as in the legacy version?
I'll make all the assets variables at the top of the code. then you can just build the array of either 1 or N images.