User:Techstyle/vector.js

javascript:(function{var%20sups=document.getElementsByTagName('sup');var%20footnotehtml=[];window.footnoteinuse=false;for(var%20i=0;i<sups.length;i++){var%20sup=sups[i];if(sup['id']){if(!sup.childNodes[0])continue;var%20child=sup.childNodes[0];if(!child['href'])continue;var%20hrefValue=child['href'];var%20footnr=hrefValue.substr(hrefValue.indexOf('#')+1);var%20footnote=document.getElementById(footnr);if(!footnote)continue;footnotehtml[i]=footnote.innerHTML;sup.setAttribute('footnoteindex',i);sup.addEventListener('mouseover',function(event){window.footnoteinuse=false;var%20footnotepopup=document.getElementById('footnotepopup');if(footnotepopup)footnotepopup.parentNode.removeChild(footnotepopup);var%20index=parseInt(this.getAttribute('footnoteindex'));var%20popup=document.createElement('div');popup.innerHTML=footnotehtml[index];popup.id='footnotepopup';popup.style.position='absolute';popup.style.left=(event.pageX-125)+'px';popup.style.top=(event.pageY+10)+'px';popup.style.width='250px';popup.style.textAlign='left';popup.style.backgroundColor='#F9F9F9';popup.style.border='1px%20solid%20#636363';popup.style.padding='10px';popup.style.zIndex='99';popup.addEventListener('mouseover',function(event){window.footnoteinuse=true;},true);popup.addEventListener('mouseout',function(event){window.footnoteinuse=false;var%20footnotepopup=document.getElementById('footnotepopup');window.setTimeout(function{if(footnotepopup&&!window.footnoteinuse&&footnotepopup.parentNode){footnotepopup.parentNode.removeChild(footnotepopup);}},150);},true);document.body.appendChild(popup);var%20footnotepopup2=document.getElementById('footnotepopup');},true);sup.addEventListener('mouseout',function(event){var%20footnotepopup=document.getElementById('footnotepopup');window.setTimeout(function{if(footnotepopup&&!window.footnoteinuse&&footnotepopup.parentNode){footnotepopup.parentNode.removeChild(footnotepopup);}},150);},true);}}});