Difference between revisions of "Widget:Feed"

From COPTR
Jump to navigation Jump to search
(Created page with " <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("feeds", "1"); function initialize() ...")
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
+
<noinclude>__NOTOC__
    <script type="text/javascript">
+
 
 +
 
 +
 
 +
</noinclude><includeonly><script type="text/javascript" src="https://www.google.com/jsapi"></script>
 +
<script type="text/javascript">
  
 
     google.load("feeds", "1");
 
     google.load("feeds", "1");
  
 
     function initialize() {
 
     function initialize() {
       var feed = new google.feeds.Feed("<!--{$id|escape:'url'}-->");
+
       var feed = new google.feeds.Feed("<!--{$url}-->");
 
       feed.load(function(result) {
 
       feed.load(function(result) {
 
         if (!result.error) {
 
         if (!result.error) {
           var container = document.getElementById("feed");
+
           var container = document.getElementById("feed-{$url|escape:'url'}");
 
           for (var i = 0; i < result.feed.entries.length; i++) {
 
           for (var i = 0; i < result.feed.entries.length; i++) {
 
             var entry = result.feed.entries[i];
 
             var entry = result.feed.entries[i];
Line 20: Line 24:
 
     google.setOnLoadCallback(initialize);
 
     google.setOnLoadCallback(initialize);
  
    </script>
+
</script>
 
+
<div id="feed-{$url|escape:'url'}"></div>
<div id="feed"></div>
+
URL <!--{$url|escape:'url'}-->
 +
</includeonly>

Latest revision as of 20:11, 12 November 2013