Archived
1
0

try to fix movement of reply box

This commit is contained in:
Jeff Becker 2016-04-30 15:06:12 -04:00
parent 0a4a3b4f8a
commit 3a26c3e38e
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
2 changed files with 2 additions and 3 deletions

View File

@ -279,8 +279,7 @@ function init(prefix) {
e.addEventListener("dragend", function(ev) { e.addEventListener("dragend", function(ev) {
var x = originalX + ev.clientX - mouseDownX; var x = originalX + ev.clientX - mouseDownX;
var y = originalY + ev.clientY - mouseDownY; var y = originalY + ev.clientY - mouseDownY;
x = window.screenLeft - x; rpl.moveTo(window.screenLeft - x, y);
rpl.moveTo(x, y);
originalX = x; originalX = x;
originalY = y; originalY = y;
}, false); }, false);

View File

@ -38,7 +38,7 @@ parent.appendChild(wrapper);parent.backlink=false;},function(msg){var wrapper=do
parent.backlink=true;}};parent.backlink=true;} parent.backlink=true;}};parent.backlink=true;}
function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx<l;idx++){var e=elems[idx];ls.push(e);} function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx<l;idx++){var e=elems[idx];ls.push(e);}
for(var elem in ls){inject_hover(prefix,ls[elem]);}} for(var elem in ls){inject_hover(prefix,ls[elem]);}}
function init(prefix){inject_hover_for_element(document);var rpl=getReplyTo();rpl.setPrefix(prefix);var e=rpl.elem;e.setAttribute("draggable","true");var mouseDownX,mouseDownY;var originalX=10;var originalY=10;rpl.moveTo(originalX,originalY);e.addEventListener("dragstart",function(ev){mouseDownX=ev.clientX;mouseDownY=ev.clientY;},false);e.addEventListener("dragend",function(ev){var x=originalX+ev.clientX-mouseDownX;var y=originalY+ev.clientY-mouseDownY;x=window.screenLeft-x;rpl.moveTo(x,y);originalX=x;originalY=y;},false);} function init(prefix){inject_hover_for_element(document);var rpl=getReplyTo();rpl.setPrefix(prefix);var e=rpl.elem;e.setAttribute("draggable","true");var mouseDownX,mouseDownY;var originalX=10;var originalY=10;rpl.moveTo(originalX,originalY);e.addEventListener("dragstart",function(ev){mouseDownX=ev.clientX;mouseDownY=ev.clientY;},false);e.addEventListener("dragend",function(ev){var x=originalX+ev.clientX-mouseDownX;var y=originalY+ev.clientY-mouseDownY;rpl.moveTo(window.screenLeft-x,y);originalX=x;originalY=y;},false);}
/* ./contrib/js/banner.js */ /* ./contrib/js/banner.js */
var banner_count=3;function nntpchan_inject_banners(elem,prefix){var n=Math.floor(Math.random()*banner_count);var banner=prefix+"static/banner_"+n+".jpg";var e=document.createElement("img");e.src=banner;e.id="nntpchan_banner";elem.appendChild(e);} var banner_count=3;function nntpchan_inject_banners(elem,prefix){var n=Math.floor(Math.random()*banner_count);var banner=prefix+"static/banner_"+n+".jpg";var e=document.createElement("img");e.src=banner;e.id="nntpchan_banner";elem.appendChild(e);}
/* ./contrib/js/expand-image.js */ /* ./contrib/js/expand-image.js */