Difference between revisions of "Widget:Feed"

From COPTR
Jump to navigation Jump to search
Line 17: Line 17:
  
 
</noinclude><includeonly><script type="text/javascript" src="http://www.netvibes.com/js/UWA/load.js.php?env=BlogWidget2"></script>
 
</noinclude><includeonly><script type="text/javascript" src="http://www.netvibes.com/js/UWA/load.js.php?env=BlogWidget2"></script>
 +
<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("<!--{$url|escape:'url'}-->");
 +
      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>
 +
    <div id="feed"></div>
 +
  </body>
  
 
<script type="text/javascript">
 
<script type="text/javascript">

Revision as of 19:56, 12 November 2013


This widget allows you to embed RSS with Netvibes on your wiki page.


Created by lamidesbetes


Using this widget

For information on how to use this widget, see widget description page on MediaWikiWidgets.org.


Copy to your site

To use this widget on your site, just install MediaWiki Widgets extension and copy full source code of this page to your wiki as Widget:Feed article.