From ce5a5c032e955026d21b1bf3a79619f8e259b6d8 Mon Sep 17 00:00:00 2001 From: xing Date: Sat, 4 Apr 2020 14:12:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=96=E5=8A=A8=E5=96=B5?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=BC=95=E8=B5=B7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tieba page.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tieba page.js b/tieba page.js index d080c31..8ba3dc4 100644 --- a/tieba page.js +++ b/tieba page.js @@ -1,7 +1,7 @@ // ==UserScript== // @name tieba page // @namespace https://github.com/fthvgb1/tampermonkey-script -// @version 0.992 +// @version 0.993 // @author fthvgb1 // @match https://tieba.baidu.com/* // @match https://tiebac.baidu.com/* @@ -804,7 +804,7 @@ e.preventDefault(); e.stopPropagation(); let touches = e.touches[0]; - let svg = e.target.parentNode.parentNode; + let svg = d; endX = sx - touches.clientX - Math.ceil(svg.offsetWidth / 2); endY = sy - touches.clientY - Math.ceil(svg.offsetHeight / 2); if (endX > sx - svg.offsetWidth) { @@ -832,7 +832,9 @@ timer = setTimeout(() => { //value.style.touchAction='none'; value.style.fill = 'rgba(210,74,195,0.3)'; - value.addEventListener('touchmove', drop); + value.addEventListener('touchmove', drop, { + passive: false + }); }, 600); }); value.addEventListener('touchend', ev => {