'+title+'';var container=$('').addClass('popup_container');container.onClose=function(){};container.addContent=function(s){$(this).find('.pcontent .boxWrap').append(s);};container.append(html);$(document.body).append(container);$('.close',container).click(function(){container.hide();container.onClose();});container.children('.mask').click(function(){container.hide();container.onClose();});container.find('.popup .header').bind('mousedown touchstart',function(){$(this).parent().attr('draggable',true);});container.find('.popup .header').bind('mouseup',function(){$(this).parent().attr('draggable',false);});container.children('.popup').get(0).ondragstart=function(e){ e.dataTransfer.setData('X',e.clientX); e.dataTransfer.setData('Y',e.clientY); e.dataTransfer.setData('left',$(this).css('left').match(/-?\d+/)[0]); e.dataTransfer.setData('top',$(this).css('top').match(/-?\d+/)[0]); $(this).css({"opacity":0.1}); }; container.children('.popup').get(0).ondrag=function(e){ }; container.children('.popup').get(0).ondragend=function(e){ $(this).css({"opacity":1});$(this).attr('draggable',false); }; container.children('.mask').get(0).ondragover=function(e){ e.preventDefault(); }; container.children('.mask').get(0).ondrop=function(e){ var x=e.dataTransfer.getData("X"); var y=e.dataTransfer.getData("Y"); var l=e.dataTransfer.getData("left"); var t=e.dataTransfer.getData("top"); var cx=e.clientX; var cy=e.clientY; var ox=parseInt(cx)-parseInt(x); var oy=parseInt(cy)-parseInt(y); container.children('.popup').css({"left":(parseInt(l)+parseInt(ox)*2)+'px',"top":(parseInt(t)+parseInt(oy)*2)+'px',"opacity":1}); };container.css({"z-index":1e4});container.mousedown(function(){});return container;};var x=document.getElementById('_to');if(x!=null){x.onclick=function(){this.setAttribute('href','');return;var c=$('#zhi').clone();var d=$('#wei').clone();c=$('').append($('').append(c).append(d).addClass('ds').css({"margin":"20px 0"})).html();d='';var e=dialog('朋友,请给她赞赏', c+d, 'm');if(e.find('canvas').css('display')=='block'){var oldCanvas=$('#zhi').find('canvas:eq(0)').get(0);var newCanvas=e.find('canvas:eq(0)').get(0);var cp=function(newCanvas,oldCanvas){var context=newCanvas.getContext('2d');newCanvas.width=oldCanvas.width;newCanvas.height=oldCanvas.height;context.drawImage(oldCanvas,0,0);};cp(newCanvas,oldCanvas);var oldCanvas=$('#wei').find('canvas:eq(0)').get(0);var newCanvas=e.find('canvas:eq(1)').get(0);cp(newCanvas,oldCanvas);}e.find('a:eq(0)').click(function(){e.hide().remove();});var _t=this;e.find('a:eq(1)').click(function(){$(this).siblings('span').show();this.innerHTML='感谢朋友!🙏';/*this.setAttribute('href',_t.getAttribute('x'));*/this.setAttribute('href','');/* close 20240408var _amount=$('.sm span.at').html();var _screen=window.screen.width+"x"+window.screen.height;this.setAttribute('href','/r/award_record/?x=CtQ9ytoWsjbACLQ-2Eg6PMbdsMkjzxbm4ek_4iKYPLoVHek64M43yxT6FLrFyEnF2ebjPE2r5tOwp8&_amount='+_amount+'&_screen='+_screen+'&_ref='+encodeURIComponent('')); */});};}})();