diff --git a/README.md b/README.md index 777db55..8f44cb0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## 使用方法 -> 奇趣保罗自己搭建的 [梦象](https://mx-model.ga) 资源站上提供了较多可用于本插件的模型资源,如果你也想在这里提交自己的原创作品,不妨现在就和我 [取得联系](https://paul.ren) 吧! +> 奇趣保罗自己搭建的 [梦象](https://mx.paul.ren) 资源站上提供了较多可用于本插件的模型资源,如果你也想在这里提交自己的原创作品,不妨现在就和我 [取得联系](https://paul.ren) 吧! 1. Star 本项目 2. 从这里 [下载](https://github.com/Dreamer-Paul/Pio/archive/master.zip) 本插件 @@ -29,10 +29,9 @@ 同时欢迎前往 [保罗的小窝](https://paul.ren/donate) 为我提供赞助,谢谢您! -## 使用的开源项目 - -- [Live2D-SRC](https://github.com/journey-ad/live2d_src) - ## 感谢 +感谢来自开源社区提供的解决方案,简化了本项目的不少工作! + - [Live2D](https://www.live2d.com) +- [Live2D-SRC](https://github.com/journey-ad/live2d_src) diff --git a/static/pio.css b/static/pio.css index 3078aef..58cfad9 100644 --- a/static/pio.css +++ b/static/pio.css @@ -18,7 +18,6 @@ user-select: none; } .pio-container:not(.loaded){ display: none } -.pio-container:not(.draggable){ bottom: 0 } .pio-container.left{ left: 0 } .pio-container.right{ right: 0 } diff --git a/static/pio.js b/static/pio.js index f685500..3163089 100644 --- a/static/pio.js +++ b/static/pio.js @@ -59,7 +59,7 @@ var Paul_Pio = function (prop) { // 移除方法 destroy: function () { current.body.parentNode.removeChild(current.body); - localStorage.setItem("posterGirl", false); + localStorage.setItem("posterGirl", 0); } }; @@ -216,17 +216,18 @@ var Paul_Pio = function (prop) { action.touch(); action.buttons(); var body = current.body; - body.onmousedown = function () { + body.onmousedown = function (downEvent) { var location = { - x: event.clientX - this.offsetLeft, - y: event.clientY - this.offsetTop + x: downEvent.clientX - this.offsetLeft, + y: downEvent.clientY - this.offsetTop }; - function move(e) { + function move(moveEvent) { body.classList.add("active"); body.classList.remove("right"); - body.style.left = (event.clientX - location.x) + 'px'; - body.style.top = (event.clientY - location.y) + 'px'; + body.style.left = (moveEvent.clientX - location.x) + 'px'; + body.style.top = (moveEvent.clientY - location.y) + 'px'; + body.style.bottom = "auto"; } document.addEventListener("mousemove", move);