Widget:Feed

From COPTR
Revision as of 19:28, 12 November 2013 by MediaWiki default (talk | contribs) (Created page with " <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("feeds", "1"); function initialize() ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
   <script type="text/javascript">
   google.load("feeds", "1");
   function initialize() {
     var feed = new google.feeds.Feed("");
     feed.load(function(result) {
       if (!result.error) {
         var container = document.getElementById("feed");
         for (var i = 0; i < result.feed.entries.length; i++) {
           var entry = result.feed.entries[i];
           var div = document.createElement("div");
           div.appendChild(document.createTextNode(entry.title));
           container.appendChild(div);
         }
       }
     });
   }
   google.setOnLoadCallback(initialize);
   </script>