function show_sources() {
if (!document.getElementsByTagName || !document.createElement ||
!document.appendChild) return;
var quotes = document.getElementsByTagName("a");
for (var i=0; i<quotes.length; i++) {
var source = quotes[i].getAttribute("source");
if (!source) continue;
var para = document.createElement("span");
var link = document.createElement("a");
para.className = "attribution";
para.appendChild(document.createTextNode(" "));
link.setAttribute("href",source);
link.appendChild(document.createTextNode("(source)"));
quotes[i].parentNode.insertBefore(link,quotes[i].nextSibling);
quotes[i].parentNode.insertBefore(para,quotes[i].nextSibling);
}
}
This is a (probably not clean) hack and rewrite of some code from