if ('undefined'==typeof(ge_included)) { ge_included_left2load=0; ge_included=new Object(); ge_included["http://javascript.gibney.org/standards.js"]=true; function ge_require_once(src) { if(ge_included[src]) return; ge_included_left2load++; var sn=document.createElement("script"); sn.onload=function(){ ge_included_left2load--; } sn.onreadystatechange=function(){ if(this.readyState=='loaded' || this.readyState=='complete'){ ge_included_left2load--;this.onreadystatechange=null; } } sn.type="text/javascript"; sn.src=src; heads=document.getElementsByTagName("head"); heads[0].appendChild(sn); ge_included[src]=true; } function startMain() { if (ge_included_left2load==0) main(); else setTimeout("startMain()",250); } } ge_require_once('http://javascript.gibney.org/dynamic_html_elements.js'); function ge_Mover() { var DragObject = null; var OffsetX = null; var OffsetY = null; this.onmousedown=function(e) { // if (e) e.stopPropagation(); if (e) e.preventDefault(); if (!e) e=window.event; // bei IE in dieser Objekteigenschaft zu finden this.DragObject = isDOM ? e.target : event.srcElement; position=this.DragObject.style.position; if (!position) this.DragObject.style.position = "relative"; x=parseInt(this.DragObject.style.left); y=parseInt(this.DragObject.style.top); if (isNaN(x)) x=0; if (isNaN(y)) y=0; this.OffsetX = e.clientX-x; this.OffsetY = e.clientY-y; DragStartX=e.clientX DragStartY=e.clientY myself=this; document.onmousemove=function(e) {myself.onmousemove(e)}; document.onmouseup=function(e) {myself.onmouseup(e)}; return false; } this.onmousemove=function(e) { if (e) e.stopPropagation(); if (!e) e=window.event; // bei IE in dieser Objekteigenschaft zu finden if ((e.shiftKey) || (e.modifiers && e.modifiers==4)) // shift key { } else { this.DragObject.style.left = e.clientX-this.OffsetX; this.DragObject.style.top = e.clientY-this.OffsetY; } return false; } this.onmouseup=function(e) { document.onmousemove = null; document.onmouseup = null; this.DragObject = null; return false; } this.onclick=function(e) { if (e) e.stopPropagation(); if (!e) e=window.event; // bei IE in dieser Objekteigenschaft zu finden return (DragStartX==e.clientX&&DragStartY==e.clientY); // Nur bei Klick ohne Drag wird ein Anchor ausgeführt } this.activate=function() { myself=this; document.onmousedown=function(e) {myself.onmousedown(e)}; document.onclick=function(e) {return myself.onclick(e)}; document.ondrag =function(e){ if (e) e.preventDefault(); return false; }; } this.deactivate=function() { document.onmousedown=null; document.onclick=null; } } function main() { if ("undefined"!=typeof(ge_bookmarklet_include_mode)) return; Mover=new ge_Mover(); Mover.activate(); message=createDiv('cm1',10,10,'
![]() | The Mover V0.6 is active. You can drag and drop anything now! |