diff --git a/dist/BlueMarble.user.js b/dist/BlueMarble.user.js
index 5a7f610..a315ab4 100644
--- a/dist/BlueMarble.user.js
+++ b/dist/BlueMarble.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Blue Marble
// @namespace https://github.com/SwingTheVine/
-// @version 0.43.0
+// @version 0.43.1
// @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
@@ -20,5 +20,5 @@
// Wplace --> https://wplace.live
// License --> https://www.mozilla.org/en-US/MPL/2.0/
-(()=>{var x=class{constructor(e,o){this.name=e,this.version=o,this.apiHandler=null,this.outputStatusId="bm-output-status"}setApiHandler(e){this.apiHandler=e}create(){let e=document.createElement("div");e.id="bm-overlay",e.style.top="10px",e.style.right="75px";let o=document.createElement("div");o.id="bm-contain-header";let t=document.createElement("div");t.id="bm-bar-drag",o.appendChild(t);let n=document.createElement("img");n.src="https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/src/assets/Favicon.png",n.alt="Blue Marble Icon",o.appendChild(n);let i=document.createElement("h1");i.textContent=this.name,o.appendChild(i);let s=document.createElement("div");s.id="bm-contain-userinfo";let a=document.createElement("p");a.id="bm-user-name",a.textContent="Username:",s.appendChild(a);let r=document.createElement("p");r.id="bm-user-droplets",r.textContent="Droplets:",s.appendChild(r);let m=document.createElement("p");m.id="bm-user-nextlevel",m.textContent="Next level in...",s.appendChild(m);let l=document.createElement("div");l.id="bm-contain-automation",l.appendChild(this.createInputCheckbox("Stealth","bm-input-stealth",!0)),l.appendChild(this.createButtonQuestion("bm-help-stealth","Help: Waits for the website to make requests, instead of sending requests.",this.outputStatusId)),l.appendChild(document.createElement("br")),l.appendChild(this.createInputCheckbox("Possessed","bm-input-possessed",!0)),l.appendChild(this.createButtonQuestion("bm-help-possessed","Help: Controls the website as if it were possessed.",this.outputStatusId)),l.appendChild(document.createElement("br"));let d=document.createElement("div");d.id="bm-contain-coords";let c=document.createElement("button");c.id="bm-button-coords",c.className="bm-help",c.style="margin-top: 0",c.innerHTML='',c.onclick=()=>{let h=this.apiHandler?.coordsTilePixel;if(!h?.[0]){this.handleDisplayError("Coordinates are malformed! Did you try clicking on the canvas first?");return}this.updateInnerHTML("bm-input-tx",h?.[0]||"0000"),this.updateInnerHTML("bm-input-ty",h?.[1]||"0000"),this.updateInnerHTML("bm-input-px",h?.[2]||"000"),this.updateInnerHTML("bm-input-py",h?.[3]||"000")},d.appendChild(c),d.appendChild(this.createInputNumber("bm-input-tx","Tl X","","4","0","2047","1")),d.appendChild(this.createInputNumber("bm-input-ty","Tl Y","","4","0","2047","1")),d.appendChild(this.createInputNumber("bm-input-px","Px X","","3","0","999","1")),d.appendChild(this.createInputNumber("bm-input-py","Px Y","","3","0","999","1")),l.appendChild(d),l.appendChild(this.createInputFile("bm-input-file"));let p=document.createElement("div");p.id="bm-contain-buttons",p.appendChild(this.createButton("bm-button-enable","Enable")),p.appendChild(this.createButton("bm-button-disable","Disable")),l.appendChild(p);let f=document.createElement("textarea");f.id=this.outputStatusId,f.readOnly=!0,f.placeholder=`Status: Sleeping...
+(()=>{var x=class{constructor(e,o){this.name=e,this.version=o,this.apiHandler=null,this.outputStatusId="bm-output-status"}setApiHandler(e){this.apiHandler=e}create(){let e=document.createElement("div");e.id="bm-overlay",e.style.top="10px",e.style.right="75px";let o=document.createElement("div");o.id="bm-contain-header";let t=document.createElement("div");t.id="bm-bar-drag",o.appendChild(t);let n=document.createElement("img");n.src="https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/src/assets/Favicon.png",n.alt="Blue Marble Icon",o.appendChild(n);let i=document.createElement("h1");i.textContent=this.name,o.appendChild(i);let s=document.createElement("div");s.id="bm-contain-userinfo";let a=document.createElement("p");a.id="bm-user-name",a.textContent="Username:",s.appendChild(a);let r=document.createElement("p");r.id="bm-user-droplets",r.textContent="Droplets:",s.appendChild(r);let m=document.createElement("p");m.id="bm-user-nextlevel",m.textContent="Next level in...",s.appendChild(m);let l=document.createElement("div");l.id="bm-contain-automation",l.appendChild(this.createInputCheckbox("Stealth","bm-input-stealth",!0)),l.appendChild(this.createButtonQuestion("bm-help-stealth","Help: Waits for the website to make requests, instead of sending requests.",this.outputStatusId)),l.appendChild(document.createElement("br")),l.appendChild(this.createInputCheckbox("Possessed","bm-input-possessed",!0)),l.appendChild(this.createButtonQuestion("bm-help-possessed","Help: Controls the website as if it were possessed.",this.outputStatusId)),l.appendChild(document.createElement("br"));let d=document.createElement("div");d.id="bm-contain-coords";let c=document.createElement("button");c.id="bm-button-coords",c.className="bm-help",c.style="margin-top: 0",c.innerHTML='',c.onclick=()=>{let h=this.apiHandler?.coordsTilePixel;if(!h?.[0]){this.handleDisplayError("Coordinates are malformed! Did you try clicking on the canvas first?");return}this.updateInnerHTML("bm-input-tx",h?.[0]||"0000"),this.updateInnerHTML("bm-input-ty",h?.[1]||"0000"),this.updateInnerHTML("bm-input-px",h?.[2]||"000"),this.updateInnerHTML("bm-input-py",h?.[3]||"000")},d.appendChild(c),d.appendChild(this.createInputNumber("bm-input-tx","Tl X","","0","2047","1")),d.appendChild(this.createInputNumber("bm-input-ty","Tl Y","","0","2047","1")),d.appendChild(this.createInputNumber("bm-input-px","Px X","","0","999","1")),d.appendChild(this.createInputNumber("bm-input-py","Px Y","","0","999","1")),l.appendChild(d),l.appendChild(this.createInputFile("bm-input-file"));let p=document.createElement("div");p.id="bm-contain-buttons",p.appendChild(this.createButton("bm-button-enable","Enable")),p.appendChild(this.createButton("bm-button-disable","Disable")),l.appendChild(p);let f=document.createElement("textarea");f.id=this.outputStatusId,f.readOnly=!0,f.placeholder=`Status: Sleeping...
Version: ${this.version}`,l.appendChild(f),e.appendChild(o),e.appendChild(document.createElement("hr")),e.appendChild(s),e.appendChild(document.createElement("hr")),e.appendChild(l),document.body.appendChild(e),this.handleDrag(e,t)}updateInnerHTML(e,o,t=!1){let n=document.getElementById(e);if(n){if(n instanceof HTMLInputElement){n.value=o;return}t?n.textContent=o:n.innerHTML=o}}createButtonQuestion(e,o,t){let n=this.createButton(e,"?");return n.className="bm-help",n.title=o,n.onclick=()=>{this.updateInnerHTML(t,o)},n}createButton(e,o,t=!0){let n=document.createElement("button");return n.id=e,n.textContent=o,n.disabled=!t,n}createInputText(e,o="",t="",n="",i=!1){let s=document.createElement("input");return s.id=e,s.type="text",s.placeholder=o,s.value=t,s.readOnly=i,s.maxLength=n,s}createInputNumber(e,o="",t="",n="",i="",s="",a=!1){let r=this.createInputText(e,o,t,"",a);return r.type="number",r.min=n,r.max=i,r.step=s,r}createInputCheckbox(e,o,t=!1){let n=document.createElement("label");n.textContent=e;let i=document.createElement("input");return i.type="checkbox",i.id=o,i.checked=t,n.prepend(i),n}createInputFile(e){let o=document.createElement("div"),t=document.createElement("input");t.id=e,t.type="file",t.style="display: none";let n=document.createElement("button");return n.textContent="Upload File",n.addEventListener("click",()=>{t.click()}),t.addEventListener("change",()=>{n.style.maxWidth=`${n.offsetWidth}px`,t.files.length>0?n.textContent=t.files[0].name:n.textContent="Upload File"}),o.appendChild(t),o.appendChild(n),o}handleDrag(e,o){let t=!1,n,i=0;o.addEventListener("mousedown",function(s){t=!0,n=s.clientX-e.getBoundingClientRect().left,i=s.clientY-e.getBoundingClientRect().top,document.body.style.userSelect="none",o.classList.add("dragging")}),o.addEventListener("touchstart",function(s){t=!0;let a=s?.touches?.[0];a&&(n=a.clientX-e.getBoundingClientRect().left,i=a.clientY-e.getBoundingClientRect().top,document.body.style.userSelect="none",o.classList.add("dragging"))},{passive:!1}),document.addEventListener("mousemove",function(s){t&&(e.style.left=s.clientX-n+"px",e.style.top=s.clientY-i+"px",e.style.right="")}),document.addEventListener("touchmove",function(s){if(t){let a=s?.touches?.[0];if(!a)return;e.style.left=a.clientX-n+"px",e.style.top=a.clientY-i+"px",s.preventDefault()}},{passive:!1}),document.addEventListener("mouseup",function(){t=!1,document.body.style.userSelect="",o.classList.remove("dragging")}),document.addEventListener("touchend",function(){t=!1,document.body.style.userSelect="",o.classList.remove("dragging")}),document.addEventListener("touchcancel",function(){t=!1,document.body.style.userSelect="",o.classList.remove("dragging")})}handleDisplayError(e){console.error(`${this.name}: ${e}`),this.updateInnerHTML(this.outputStatusId,"Error: "+e,!0)}};var g=class{serverTPtoDisplayTP(e,o){return[parseInt(e[0])%4*1e3+parseInt(o[0]),parseInt(e[1])%4*1e3+parseInt(o[1])]}};var C=class{constructor(e){this.coordsHandler=e,this.disableAll=!1,this.coordsTilePixel=[]}spontaneousResponseListener(e){window.addEventListener("message",o=>{let t=o.data;if(!(t&&t.source==="blue-marble"))return;let n=t.endpoint.split("?")[0].split("/").filter(i=>i&&isNaN(Number(i))).pop();switch(console.log(`Recieved message about "${n}"`),n){case"me":let i=Math.ceil(Math.pow(Math.floor(t.jsonData?.level)*Math.pow(30,.65),1.5384615384615383)-t.jsonData?.pixelsPainted);e.updateInnerHTML("bm-user-name",`Username: ${t.jsonData?.name}`),e.updateInnerHTML("bm-user-droplets",`Droplets: ${new Intl.NumberFormat().format(t.jsonData?.droplets)}`),e.updateInnerHTML("bm-user-nextlevel",`Next level in ${new Intl.NumberFormat().format(i)} pixel${i==1?"":"s"}`);break;case"pixel":let s=t.endpoint.split("?")[0].split("/").filter(d=>d&&!isNaN(Number(d))),a=new URLSearchParams(t.endpoint.split("?")[1]),r=[a.get("x"),a.get("y")];this.coordsTilePixel=[...s,...r];let m=this.coordsHandler.serverTPtoDisplayTP(s,r),l=document.querySelectorAll("span");for(let d of l)if(d.textContent.trim().includes(`${m[0]}, ${m[1]}`)){let c=document.querySelector("#bm-display-coords"),p=`(Tl X: ${s[0]}, Tl Y: ${s[1]}, Px X: ${r[0]}, Px Y: ${r[1]})`;c?c.textContent=p:(c=document.createElement("span"),c.id="bm-display-coords",c.textContent=p,c.style="margin-left: calc(var(--spacing)*3);",d.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",c))}break;case"robots":this.disableAll=t.jsonData?.userscript?.toString().toLowerCase()=="false";break}})}};var E=GM_info.script.name.toString(),v=GM_info.script.version.toString();function L(u){let e=document.createElement("script");e.textContent=`(${u})();`,document.documentElement.appendChild(e),e.remove()}L(()=>{let u=window.fetch;window.fetch=async function(...e){let o=await u.apply(this,e),t=o.clone();if((t.headers.get("content-type")||"").includes("application/json")){let i=(e[0]instanceof Request?e[0]?.url:e[0])||"ignore";console.log(`Sending JSON message about endpoint "${i}"`),t.json().then(s=>{window.postMessage({source:"blue-marble",endpoint:i,jsonData:s},"*")}).catch(s=>{console.error("BM - Failed to parse JSON:",s)})}return o}});var w=GM_getResourceText("CSS-BM-File");GM_addStyle(w);var b=document.createElement("link");b.href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap";b.rel="preload";b.as="style";b.onload="this.onload=null;this.rel='stylesheet'";document.head.appendChild(b);var y=new x(E,v),T=new g,I=new C(T);y.setApiHandler(I);y.create();I.spontaneousResponseListener(y);console.log(`${E} (${v}) userscript has loaded!`);})();
diff --git a/docs/README.md b/docs/README.md
index 5d9fa25..d66f710 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -35,7 +35,7 @@
-
+
diff --git a/package-lock.json b/package-lock.json
index 24cd166..2646401 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7,7 +7,7 @@
"devDependencies": {
"esbuild": "^0.25.0"
},
- "version": "0.42.16"
+ "version": "0.43.1"
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.8",
@@ -467,5 +467,5 @@
}
}
},
- "version": "0.42.16"
+ "version": "0.43.1"
}
diff --git a/package.json b/package.json
index 7056402..1c13121 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wplace-bluemarble",
- "version": "0.43.0",
+ "version": "0.43.1",
"type": "module",
"scripts": {
"build": "node build/build.js",
diff --git a/src/BlueMarble.meta.js b/src/BlueMarble.meta.js
index b8b23be..7788f0e 100644
--- a/src/BlueMarble.meta.js
+++ b/src/BlueMarble.meta.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Blue Marble
// @namespace https://github.com/SwingTheVine/
-// @version 0.43.0
+// @version 0.43.1
// @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
diff --git a/src/overlay.js b/src/overlay.js
index a54870f..b3ed4a8 100644
--- a/src/overlay.js
+++ b/src/overlay.js
@@ -124,10 +124,10 @@ export class Overlay {
containerAutomationCoords.appendChild(buttonCoords); // Adds the coordinate button to the automation container
// Tile (x,y) and Pixel (x,y) input fields
- containerAutomationCoords.appendChild(this.createInputNumber('bm-input-tx', 'Tl X', '', '4', '0', '2047', '1'));
- containerAutomationCoords.appendChild(this.createInputNumber('bm-input-ty', 'Tl Y', '', '4', '0', '2047', '1'));
- containerAutomationCoords.appendChild(this.createInputNumber('bm-input-px', 'Px X', '', '3', '0', '999', '1'));
- containerAutomationCoords.appendChild(this.createInputNumber('bm-input-py', 'Px Y', '', '3', '0', '999', '1'));
+ containerAutomationCoords.appendChild(this.createInputNumber('bm-input-tx', 'Tl X', '', '0', '2047', '1'));
+ containerAutomationCoords.appendChild(this.createInputNumber('bm-input-ty', 'Tl Y', '', '0', '2047', '1'));
+ containerAutomationCoords.appendChild(this.createInputNumber('bm-input-px', 'Px X', '', '0', '999', '1'));
+ containerAutomationCoords.appendChild(this.createInputNumber('bm-input-py', 'Px Y', '', '0', '999', '1'));
containerAutomation.appendChild(containerAutomationCoords); // Adds coord container to automation container