User:Mrbartjens/citationHider.js

function findRefs { var l = document.getElementsByTagName('sup'); if(l.length > 0) { var div = document.createElement('div'); div.style.position = 'fixed'; div.style.bottom = '0'; div.style.left = '0'; div.style.background = '#FFF;' div.style.padding = '4px'; div.style.border = '1px solid #AAA;' div.style.borderBottom = '0'; div.style.borderLeft = '0'; var a = document.createElement('a'); a.setAttribute('href', 'javascript:;'); a.onclick = function { var s = document.getElementsByTagName('sup'); var n = (this.innerHTML == 'show references') ? '' : 'none'; for(var i=0;i<s.length;i++) { if(s[i].className == 'reference') { s[i].style.display = n;       } }     this.innerHTML = (n == '') ? 'hide references' : 'show references'; }   a.innerHTML = 'hide references'; div.appendChild(a); document.getElementsByTagName('body')[0].appendChild(div); } }

hookEvent('load', findRefs);