MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

function getrss { feed = document.getElementById("feedholder"); if (feed) { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP") } xhttp.open("GET","/export/rss2_keepsake.php?group_id=49159", false); xhttp.send(""); xmlDoc=xhttp.responseXML.getElementsByTagName("item"); str = "Latest news  "; for(var i=0; i<5; i++){ str += "" + xmlDoc[i].getElementsByTagName("pubDate")[0].childNodes[0].nodeValue + " : "; str += xmlDoc[i].getElementsByTagName("title")[0].childNodes[0].nodeValue + " - "; str += "link"; }       str += ""; feed.innerHTML = str; } }

addOnloadHook(getrss);