Difference between revisions of "Template:IONIS Paris/JS"

Line 35: Line 35:
  
 
$(document).ready(function(){
 
$(document).ready(function(){
console.log("ready to play.");
+
 
 
if ($('#myCarousel video').length != 0)
 
if ($('#myCarousel video').length != 0)
 
{  
 
{  
Line 42: Line 42:
 
     interval: false
 
     interval: false
 
});
 
});
     console.log("paused as we have videos: ", ret);
+
      
 
} else {
 
} else {
     console.log("no video, let's roll!");
+
      
 
     $('#myCarousel').carousel('cycle');
 
     $('#myCarousel').carousel('cycle');
 
}
 
}
 
});
 
});
 
//NB
 
//NB
function findFeedLinks() {
 
// Find all the RSS link elements.
 
var result = document.evaluate(
 
'//*[local-name()="link"][contains(@rel, "alternate")] ' +
 
'[contains(@type, "rss") or contains(@type, "atom") or ' +
 
'contains(@type, "rdf")]', document, null, 0, null
 
);
 
 
var feeds = [];
 
var item;
 
while (item = result.iterateNext()) {
 
feeds.push({"href": item.href, "title": item.title});
 
}
 
 
if (feeds.length == 0)
 
return false;
 
 
// Notify the extension needs to show the RSS page action icon.
 
sendMessage({type: "feedsFound", feeds: feeds});
 
return true;
 
};
 
  
  

Revision as of 21:05, 11 September 2015