[PR]
×
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
「2次元狂詩曲」はアニメ・ゲーム・サッカー等の感想を気ままに語るサイトです
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
<script type="text/javascript"> <!-- var infoObj = {'http://rss.exblog.jp/rss/exblog/chaosbot/atom.xml':0, 'http://favorrag.blog115.fc2.com/?xml':0, 'http://privatemoon.jp/feed/':0, 'http://ro-blog.livedoor.biz/index.rdf':0, 'http://nayuta2.seesaa.net/index20.rdf':0, 'http://rss.exblog.jp/rss/exblog/agilitypri/index.xml':2, 'http://yaplog.jp/naonaodeath/index1_0.rdf':7 }; var RSSurl = new Array(); for( var i in infoObj){ RSSurl.push({url:i,val:infoObj[i]}); } var len = RSSurl.length; function rssFeeds(){ this.rssArray = new Array(); } function strFeeds(fe,date,_v){ this.feedStructure = fe; this.mDate = date; this.infoVal = _v; } var RssData = new rssFeeds(); google.load("feeds", "1"); function sortFeed(arr,key){ arr.sort( function(b1, b2){ return b1[key] < b2[key] ? 1 : -1; } ); } function dateToString(date){ //var wArray = new Array("日","月","火","水","木","金","土"); //var week = wArray[date.getDay()]; var year = date.getFullYear(); var month = date.getMonth()+1; var day = date.getDate(); var hour = date.getHours(); var minutes = date.getMinutes(); var seconds = date.getSeconds(); if(month < 10){month = "0" + month;} if(day < 10){day = "0" + day;} if(hour < 10){hour = "0" + hour;} if(minutes < 10){minutes = "0" + minutes;} if(seconds < 10){seconds = "0" + seconds;} var dateStr = year + "-" + month + "-" + day + " (" + hour + ":" + minutes + ")"; return dateStr; } function displayFeed(rFeed,n){ var structure = rFeed.rssArray[n].feedStructure; var val = rFeed.rssArray[n].infoVal; var title = structure.feed.title; var link = structure.feed.link; var description = structure.feed.description; var author = structure.feed.author; var classArray = new Array("orange","red","skyblue","yelow","blue","green","violet","black","white"); var htmlstr = ""; htmlstr += '<ul class="' + classArray[val] + '">'; for (var k = 0, strLength = structure.feed.entries.length; k < strLength; k++) { htmlstr += '<li>'; htmlstr += '<p><a href="' + link + '" target="_blank">' + title + '</a></p>'; var entry = structure.feed.entries[k]; var entryTitle = entry.title; // var entryLink = entry.link; // var entryDesc = entry.content; // var entrySnippet = entry.contentSnippet; // var entryCategory = entry.categories; var publishedDate = entry.publishedDate; var pDate = new Date(publishedDate); htmlstr += '<dl><dt>' + dateToString(pDate) + '</dt><dd>' + entryTitle + '</dd></dl>'; htmlstr += '</li>'; } htmlstr += '</ul>'; return htmlstr; } function setRSS(num, iVal){ var sortDate; var container = document.getElementById("feed"); var outstr = ""; return function(result){ if (!result.error) { sortDate = (new Date(result.feed.entries[0].publishedDate)).getTime(); RssData.rssArray.push( new strFeeds(result,sortDate,iVal)); }else{ alert(result.error.code + ":" + result.error.message); } if(num == len - 1){ //最後のフィード追加が終ったら出力する sortFeed(RssData.rssArray,'mDate'); for(var j=0; j < len ; j++){ outstr += displayFeed(RssData,j); } container.innerHTML = outstr; } } } function initialize() { for(var i=0; i < len; i++){ var feed = new google.feeds.Feed(RSSurl[i].url); feed.setNumEntries(1); //一つのサイトの記事数 feed.load(setRSS(i,RSSurl[i].val)); } } google.setOnLoadCallback(initialize); //--> </script>以下のサイトを参考にしました。
10 | 2024/11 | 12 |
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |