From aae685ee2c65de07c2a7dae29869aeb55c9e8882 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 26 Jul 2025 03:32:13 +0000 Subject: [PATCH] Bumped version; Finished(?) pin icon functionality --- dist/BlueMarble.user.css | 2 +- dist/BlueMarble.user.js | 4 ++-- docs/README.md | 2 +- package.json | 2 +- src/BlueMarble.meta.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/BlueMarble.user.css b/dist/BlueMarble.user.css index ffbbb76..b1ed01c 100644 --- a/dist/BlueMarble.user.css +++ b/dist/BlueMarble.user.css @@ -1 +1 @@ -#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url('data:image/svg+xml;utf8,') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-contain-header{margin-bottom:.5em}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.25em;width:1.25em;margin-top:2px;text-align:center;line-height:1.25em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}#bm-contain-coords input[type=number]{width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-buttons{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons,div:has(>#bm-input-file),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through} +#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url('data:image/svg+xml;utf8,') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-contain-header{margin-bottom:.5em}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.25em;width:1.25em;margin-top:2px;text-align:center;line-height:1.25em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}#bm-contain-coords input[type=number]{-moz-appearance:textfield;width:4.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons,div:has(>#bm-input-file),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through} diff --git a/dist/BlueMarble.user.js b/dist/BlueMarble.user.js index a72768e..ae5ed59 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.41.11 +// @version 0.42.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 @@ -20,5 +20,5 @@ // Wplace --> https://wplace.live // License --> https://www.mozilla.org/en-US/MPL/2.0/ -(()=>{var g=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 c=document.createElement("p");c.id="bm-user-nextlevel",c.textContent="Next level in...",s.appendChild(c);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 u=document.createElement("button");u.id="bm-button-coords",u.className="bm-help",u.style="margin-top: 0",u.innerHTML='',u.onclick=()=>{let m=this.apiHandler?.coordsTilePixel;if(m?.[0]){this.handleDisplayError("Coordinates are malformed! Did you try clicking on the canvas first?");return}this.updateInnerHTML("bm-input-tx",m?.[0]||"0000"),this.updateInnerHTML("bm-input-ty",m?.[1]||"0000"),this.updateInnerHTML("bm-input-px",m?.[2]||"0000"),this.updateInnerHTML("bm-input-py",m?.[3]||"0000")},d.appendChild(u),d.appendChild(this.createInputNumber("bm-input-tx","Tl X","","3","0","999","1")),d.appendChild(this.createInputNumber("bm-input-ty","Tl Y","","3","0","999","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 b=document.createElement("div");b.id="bm-contain-buttons",b.appendChild(this.createButton("bm-button-enable","Enable")),b.appendChild(this.createButton("bm-button-disable","Disable")),l.appendChild(b);let f=document.createElement("textarea");f.id=this.outputStatusId,f.readOnly=!0,f.placeholder=`Status: Sleeping... +(()=>{var g=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 c=document.createElement("p");c.id="bm-user-nextlevel",c.textContent="Next level in...",s.appendChild(c);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 u=document.createElement("button");u.id="bm-button-coords",u.className="bm-help",u.style="margin-top: 0",u.innerHTML='',u.onclick=()=>{let m=this.apiHandler?.coordsTilePixel;if(!m?.[0]){this.handleDisplayError("Coordinates are malformed! Did you try clicking on the canvas first?");return}this.updateInnerHTML("bm-input-tx",m?.[0]||"000"),this.updateInnerHTML("bm-input-ty",m?.[1]||"000"),this.updateInnerHTML("bm-input-px",m?.[2]||"000"),this.updateInnerHTML("bm-input-py",m?.[3]||"000")},d.appendChild(u),d.appendChild(this.createInputNumber("bm-input-tx","Tl X","","3","0","999","1")),d.appendChild(this.createInputNumber("bm-input-ty","Tl Y","","3","0","999","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 b=document.createElement("div");b.id="bm-contain-buttons",b.appendChild(this.createButton("bm-button-enable","Enable")),b.appendChild(this.createButton("bm-button-disable","Disable")),l.appendChild(b);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="",r=!1){let c=this.createInputText(e,o,t,n,r);return c.type="number",c.min=i,c.max=s,c.step=a,c}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 x=class{constructor(){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(c=>c&&!isNaN(Number(c))),a=new URLSearchParams(t.endpoint.split("?")[1]),r=[a.get("x"),a.get("y")];this.coordsTilePixel=[...s,...r];break;case"robots":this.disableAll=t.jsonData?.userscript?.toString().toLowerCase()=="false";break}})}};var y=GM_info.script.name.toString(),E=GM_info.script.version.toString();function L(p){let e=document.createElement("script");e.textContent=`(${p})();`,document.documentElement.appendChild(e),e.remove()}L(()=>{let p=window.fetch;window.fetch=async function(...e){let o=await p.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 I=GM_getResourceText("CSS-BM-File");GM_addStyle(I);var h=document.createElement("link");h.href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap";h.rel="preload";h.as="style";h.onload="this.onload=null;this.rel='stylesheet'";document.head.appendChild(h);var C=new g(y,E),v=new x;C.setApiHandler(v);C.create();v.spontaneousResponseListener(C);console.log(`${y} (${E}) userscript has loaded!`);})(); diff --git a/docs/README.md b/docs/README.md index 99bf077..d450acc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,7 +30,7 @@

Blue Marble

-Latest Version +Latest Version Latest Release Software License: MPL-2.0 Contact Me diff --git a/package.json b/package.json index e87e194..f57dba3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wplace-bluemarble", - "version": "0.41.11", + "version": "0.42.0", "type": "module", "scripts": { "build": "node build/build.js", diff --git a/src/BlueMarble.meta.js b/src/BlueMarble.meta.js index d13cc9c..3f17717 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.41.11 +// @version 0.42.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