User:Nagarajuepuri/myskin.js

$(function {  wikiPostToTwitter.fnPostToTwitter = function {      window.open("http://twitter.com?status="+document.getElementsByTagName("title")[0].innerHTML + " - " + window.location);   };

wikiPostToTwitter.load = function { var divElm = document.createElement( "DIV" ); divElm.setAttribute( "id", "postToTwitter" ); divElm.setAttribute( "style", "display:none;position:absolute;left:0px;top:0px;border:1px solid #000;padding:5px;background-color:#FFF;z-index:99;" ); divElm.innerHTML = "Post this wiki page to Twitter"; document.getElementsByTagName( "BODY" )[0].appendChild( divElm ); };

wikiPostToTwitter.load;

var logoElm = document.getElementById("p-logo"); var pttElm = document.getElementById( "postToTwitter" ); logoElm.onmouseover = function{ pttElm.style.display = "block"; pttElm.style.width = (logoElm.offsetWidth-10) + "px"; };

logoElm.onmouseout = function{ pttElm.style.display = "none"; };

pttElm.onmouseover = function{ pttElm.style.display = "block"; pttElm.style.width = (logoElm.offsetWidth-10) + "px"; };

pttElm.onmouseout = function{ pttElm.style.display = "none"; };

});

if(!wikiPostToTwitter) { var wikiPostToTwitter = {}; }