var getRoomDetails; if (!getRoomDetails) { getRoomDetails = function (name) { var url = 'https://www.triggerless.com/imvu/Room.ashx?room=' + name; $(document).ready(function() { $.ajax({ url: url, method: 'GET', success: function (data) { var roomInfo = $.parseJSON(data); $('#room-img-' + name).attr('src', roomInfo.img); $('#room-name-' + name).html(roomInfo.room_name); $('#room-owner-' + name).text(roomInfo.owner).attr('href', 'http://avatars.imvu.com/' + roomInfo.owner); $('#room-desc-' + name).html(decodeURIComponent(roomInfo.desc)); $('#room-count-' + name).text(roomInfo.count); $('#room-max-' + name).text(roomInfo.max); $('#room-join-' + name).attr('href', 'imvu:JoinPublicRoom?room_instance_id=' + roomInfo.roomId); if (roomInfo.ap === '1') { $('#room-ap-' + name).css('display', 'inline'); } if (roomInfo.vip === '1') { $('#room-vip-' + name).css('display', 'inline'); } var html = 'Who\'s there: '; var delim = ''; for (var i = 0; i < roomInfo.participants.length; i++) { var p = roomInfo.participants[i]; var add = '{p.name} ({p.size} KB)'; add = add.replace('{p.name}', p.name).replace('{p.size}', p.size); html += delim + add; delim = ' | '; } if (roomInfo.participants.length == 0) html += 'Nobody'; $('#room-avis-' + name).empty().append(html); } }); }); } } document.write('
\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('
\n'); document.write('\n'); document.write('\n'); document.write('
{roomInfo.room_name}
\n'); document.write('\n'); document.write('
{roomInfo.desc}
\n'); document.write('
\n'); document.write(' \n'); document.write(' \n'); document.write(' Participants: {roomInfo.count} /\n'); document.write(' {roomInfo.max} | Join\n'); document.write('
\n'); document.write('
Who's there: \n'); document.write(' \n'); document.write(' AvatarName (2.511 KB)\n'); document.write(' \n'); document.write('
\n'); document.write('
\n'); document.write('
\n'); getRoomDetails('your-room');