google.load("feeds", "1");   
function initialize()
{   
	//RSSフィードの取得
	//var feed = new google.feeds.Feed("http://feedblog.ameba.jp/rss/ameblo/kiyorist-na-tu-ra-l/rss20.xml");   
	var feed = new google.feeds.Feed("http://rssblog.ameba.jp/kiyorist-na-tu-ra-l/rss.html");   

	//取得するフィード数
	feed.setNumEntries(6)   
	
	//実際に読む込む
	feed.load(function(result) 
	{   
		//読み込めたか判別
		if (!result.error) 
		{
			//表示部分を選択
			var container = document.getElementById("entryList");
			
			//変数の初期化
			var list = "";
			list += '<ul>';
			
			//Feedの処理
			for (var i = 0; i < result.feed.entries.length; i++) 
			{   
				//Feedを一つ抽出
				var entry = result.feed.entries[i];

				if(entry.title.match(/^PR:/)) {
					//「PR:」から始まるものがあれば何もしない
				}
				else{
					(i == 0) ? list += '<li class=\"first\">' : list += '<li>';
					
					var pdate = new Date(entry.publishedDate);
					var pyear = pdate.getFullYear();
					var pmonth = pdate.getMonth() + 1;
					var pday = pdate.getDate();					
					var strdate = pyear + "/" + pmonth  + "/" + pday;
					list += '<span class=\"date\">' + strdate + '</span>';
					
					list += '<a class=\"title\" href="' + entry.link + '" target=\"_blank\">' + entry.title + '</a>';
					list += '</li>';
				}
			} 
			list += '</ul>';
			container.innerHTML = list;
		}   
	});   
}

google.setOnLoadCallback(initialize); 

