mirror of
https://github.com/SwingTheVine/Wplace-BlueMarble.git
synced 2026-04-20 18:32:04 +00:00
Bumped version; Fixed a bug in overlay drag bar
This commit is contained in:
parent
2adbf8689c
commit
6447e8d9a0
3 changed files with 4 additions and 4 deletions
4
dist/BlueMarble.user.js
vendored
4
dist/BlueMarble.user.js
vendored
|
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name Blue Marble
|
||||
// @namespace https://github.com/SwingTheVine/
|
||||
// @version 0.10.0
|
||||
// @version 0.11.0
|
||||
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
|
||||
// @author SwingTheVine
|
||||
// @license MPL-2.0
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
// Wplace --> https://wplace.live
|
||||
// License --> https://www.mozilla.org/en-US/MPL/2.0/
|
||||
|
||||
(()=>{var i=class{constructor(){}create(){let e=document.createElement("div");e.id="bm-overlay",e.style.top="10px",e.style.right="75px";let d=document.createElement("div");d.id="bm-bar-drag";let t=document.createElement("img");t.src="https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/src/assets/Favicon.png",t.alt="Blue Marble Icon";let c=document.createElement("h1");c.textContent="Blue Marble",e.appendChild(d),e.appendChild(t),e.appendChild(c),e.appendChild(document.createElement("hr")),document.body.appendChild(e),this.handleDrag(e,d)}handleDrag(e,d){let t=!1,c,o=0;d.addEventListener("mousedown",function(n){t=!0,c=n.clientX-e.getBoundingClientRect().left,o=n.clientY-e.getBoundingClientRect().top,document.body.style.userSelect="none",e.style.right="",e.classList.add("dragging")}),d.addEventListener("touchstart",function(n){t=!0;let s=n?.touches?.[0];s&&(c=s.clientX-e.getBoundingClientRect().left,o=s.clientY-e.getBoundingClientRect().top,document.body.style.userSelect="none",e.style.right="",e.classList.add("dragging"))},{passive:!1}),document.addEventListener("mousemove",function(n){t&&(e.style.left=n.clientX-c+"px",e.style.top=n.clientY-o+"px")}),document.addEventListener("touchmove",function(n){if(t){let s=n?.touches?.[0];if(!s)return;e.style.left=s.clientX-c+"px",e.style.top=s.clientY-o+"px",n.preventDefault()}},{passive:!1}),document.addEventListener("mouseup",function(){t=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchend",function(){t=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchcancel",function(){t=!1,document.body.style.userSelect="",e.classList.remove("dragging")})}};var l=GM_getResourceText("CSS-Overlay");GM_addStyle(l);console.log("Blue Marble script has loaded.");var a=new i;a.create();})();
|
||||
(()=>{var l=class{constructor(){}create(){let e=document.createElement("div");e.id="bm-overlay",e.style.top="10px",e.style.right="75px";let t=document.createElement("div");t.id="bm-bar-drag";let n=document.createElement("img");n.src="https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/src/assets/Favicon.png",n.alt="Blue Marble Icon";let s=document.createElement("h1");s.textContent="Blue Marble",e.appendChild(t),e.appendChild(n),e.appendChild(s),e.appendChild(document.createElement("hr")),document.body.appendChild(e),this.handleDrag(e,t)}handleDrag(e,t){let n=!1,s,d=0;t.addEventListener("mousedown",function(c){n=!0,s=c.clientX-e.getBoundingClientRect().left,d=c.clientY-e.getBoundingClientRect().top,document.body.style.userSelect="none",e.style.right="",t.classList.add("dragging")}),t.addEventListener("touchstart",function(c){n=!0;let o=c?.touches?.[0];o&&(s=o.clientX-e.getBoundingClientRect().left,d=o.clientY-e.getBoundingClientRect().top,document.body.style.userSelect="none",e.style.right="",t.classList.add("dragging"))},{passive:!1}),document.addEventListener("mousemove",function(c){n&&(e.style.left=c.clientX-s+"px",e.style.top=c.clientY-d+"px")}),document.addEventListener("touchmove",function(c){if(n){let o=c?.touches?.[0];if(!o)return;e.style.left=o.clientX-s+"px",e.style.top=o.clientY-d+"px",c.preventDefault()}},{passive:!1}),document.addEventListener("mouseup",function(){n=!1,document.body.style.userSelect="",t.classList.remove("dragging")}),document.addEventListener("touchend",function(){n=!1,document.body.style.userSelect="",t.classList.remove("dragging")}),document.addEventListener("touchcancel",function(){n=!1,document.body.style.userSelect="",t.classList.remove("dragging")})}};var i=GM_getResourceText("CSS-Overlay");GM_addStyle(i);console.log("Blue Marble script has loaded.");var u=new l;u.create();})();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.10.0",
|
||||
"version": "0.11.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "node build/build.js",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name Blue Marble
|
||||
// @namespace https://github.com/SwingTheVine/
|
||||
// @version 0.10.0
|
||||
// @version 0.11.0
|
||||
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
|
||||
// @author SwingTheVine
|
||||
// @license MPL-2.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue