User:Jonnylinuxnerd/monobook.js: Difference between revisions

Content deleted Content added
mNo edit summary
mNo edit summary
Line 1:
<!--/*offsetX=150
document.write('<div id="window" style="position:absolute;top:20px;right:10px;background-color:lightgreen;width:200px;height:400px;z-index:9;opacity:0.6;"><div style="text-align:center;font-size:24pt;"><b><u>Jot-pad</u></b></div>');
offsetY=20
 
windowX=10
windowY=10
 
moveAllowed=false
 
document.onMouseMove=function mouseMove(theEvent){
if (document.all){
mouseX=theEvent.x
mouseY=theEvent.y
}
else
{
mouseX=theEvent.pageX
mouseY=theEvent.pageY
}
if (moveAllowed==true){
moveWindow()
}
}
 
function calcOffset(){
offsetX=windowX-mouseX
offsetY=windowY-mouseY
}
 
 
function moveWindow(){
windowX=mouseX+offsetX
windowY=mouseY+offsetY
var window=document.getElementById("window")
window.style.left=windowX
window.style.top=windowY
}
 
 
document.write('<div id="window" style="position:absolute;top:20px;right:10px;background-color:lightgreen;width:200px250px;height:400px;z-index:9;opacity:0.6;text-align:center;cursor:move;" onMouseDown="moveAllowed=true;calcOffset()" onMouseUp="moveAllowed=false"><div style="text-align:center;font-size:24pt;"><b><u>Jot-pad</u></b></div><textarea rows="21"></textarea></div>');*/-->