diff --git a/build/build.js b/build/build.js index 4f611b6..175c458 100644 --- a/build/build.js +++ b/build/build.js @@ -55,16 +55,19 @@ const resultEsbuild = await esbuild.build({ platform: 'browser', // The platform the bundled code will be operating on legalComments: 'inline', // What level of legal comments are preserved? (Hard: none, Soft: inline) minify: false, // Should the code be minified? - write: false // Should we write the outfile? + write: false, // Should we write the outfile? + sourcemap: true, }).catch(() => process.exit(1)); -// Retrieves the JS file +// Retrieves the JS file and map file const resultEsbuildJS = resultEsbuild.outputFiles.find(file => file.path.endsWith('.js')); +const resultEsbuildMap = resultEsbuild.outputFiles.find(file => file.path.endsWith('.map')); // Obfuscates the JS file const resultTerser = await terser.minify(resultEsbuildJS.text, { sourceMap: { - filename: 'dist/BlueMarble.user.js', // The file to make a sourcemap for + content: resultEsbuildMap.text, // The esbundle sourcemap + filename: 'BlueMarble.user.js', // The file to make a sourcemap for url: ' ' // (This setting is intentional) The sourcemap url to point to. }, mangle: { diff --git a/dist/BlueMarble.user.js b/dist/BlueMarble.user.js index 683b06c..c76d5ea 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.48.0 +// @version 0.48.3 // @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 t,e,n=t=>{throw TypeError(t)},s=(t,e,s)=>(((t,e)=>{e.has(t)||n("Cannot access private method")})(t,e),s);t=new WeakSet,e=function(t,e={},n={}){const s=document.createElement(t);this.t?(this.i.appendChild(s),this.o.push(this.i),this.i=s):(this.t=s,this.i=s);for(const[t,n]of Object.entries(e))s[t]=n;for(const[t,e]of Object.entries(n))s[t]=e;return s};var i=class{static h(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}},o=GM_info.script.name.toString(),r=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.textContent=`(${t})();`,document.documentElement.appendChild(e),e.remove()}(()=>{const t=window.fetch;window.fetch=async function(...e){const n=await t.apply(this,e),s=n.clone();if((s.headers.get("content-type")||"").includes("application/json")){let t=(e[0]instanceof Request?e[0]?.url:e[0])||"ignore";s.json().then(e=>{window.postMessage({source:"blue-marble",endpoint:t,jsonData:e},"*")}).catch(t=>{})}return n}});var a=GM_getResourceText("CSS-BM-File");GM_addStyle(a);var c=document.createElement("link");c.href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap",c.rel="preload",c.as="style",c.onload=function(){this.onload=null,this.rel="stylesheet"},document.head.appendChild(c),new class{constructor(){this.l=null,this.u=null,this.m="#bm-display-coords"}p(t){return this.u=t,this.l=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.m)}),this}v(){return this.l}observe(t,e=!1,n=!1){t.observe(this.u,{childList:e,subtree:n})}};var h=new class{constructor(e,s){var i,o;i=this,(o=t).has(i)?n("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,undefined),this.name=e,this.version=s,this.M=null,this.C="bm-output-status",this.t=null,this.i=null,this.o=[]}$(t){this.M=t}T(){return this.o.length>0&&(this.i=this.o.pop()),this}k(t){t.appendChild(this.t),this.t=null,this.i=null,this.o=[]}I(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"div",{},n)),this}H(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"p",{},n)),this}N(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"img",{},n)),this}L(n,i={},o=()=>{}){return o(this,s(this,t,e).call(this,"h"+n,{},i)),this}S(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"hr",{},n)),this}B(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"br",{},n)),this}D(n={},i=()=>{}){const o=s(this,t,e).call(this,"label",{textContent:n.textContent??""});delete n.textContent;const r=s(this,t,e).call(this,"input",{type:"checkbox"},n);return o.insertBefore(r,o.firstChild),this.T(),i(this,o,r),this}P(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"button",{},n)),this}O(n={},i=()=>{}){const o=n.title??n.textContent??"Help: No info";delete n.textContent,n.title=`Help: ${o}`;const r={textContent:"?",className:"bm-help",onclick:()=>{this.R(this.C,o)}};return i(this,s(this,t,e).call(this,"button",r,n)),this}j(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"input",{},n)),this}G(n={},i=()=>{}){const o=n.textContent??"";delete n.textContent;const r=s(this,t,e).call(this,"div"),a=s(this,t,e).call(this,"input",{type:"file",style:"display: none;"},n);this.T();const c=s(this,t,e).call(this,"button",{textContent:o});return this.T(),this.T(),c.addEventListener("click",()=>{a.click()}),a.addEventListener("change",()=>{c.style.maxWidth=`${c.offsetWidth}px`,a.files.length>0?c.textContent=a.files[0].name:c.textContent=o}),i(this,r,a,c),this}U(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"textarea",{},n)),this}R(t,e,n=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:n?s.textContent=e:s.innerHTML=e)}W(t,e){let n,s=!1,i=0;t=document.querySelector("#"==t?.[0]?t:"#"+t),e=document.querySelector("#"==e?.[0]?e:"#"+e),t&&e?(e.addEventListener("mousedown",function(o){s=!0,n=o.clientX-t.getBoundingClientRect().left,i=o.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging")}),e.addEventListener("touchstart",function(o){s=!0;const r=o?.touches?.[0];r&&(n=r.clientX-t.getBoundingClientRect().left,i=r.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging"))},{passive:!1}),document.addEventListener("mousemove",function(e){s&&(t.style.left=e.clientX-n+"px",t.style.top=e.clientY-i+"px",t.style.right="")}),document.addEventListener("touchmove",function(e){if(s){const s=e?.touches?.[0];if(!s)return;t.style.left=s.clientX-n+"px",t.style.top=s.clientY-i+"px",e.preventDefault()}},{passive:!1}),document.addEventListener("mouseup",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchend",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchcancel",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")})):this.X(`Can not drag! ${t?"":"moveMe"} ${t||e?"":"and "}${e?"":"iMoveThings "}was not found!`)}X(t){(0,console.error)(`${this.name}: ${t}`),this.R(this.C,"Error: "+t,!0)}}(o,r),d=new class{Y(t,e){return[parseInt(t[0])%4*1e3+parseInt(e[0]),parseInt(t[1])%4*1e3+parseInt(e[1])]}},l=new class{constructor(t){this._=t,this.q=!1,this.F=[]}V(t){window.addEventListener("message",e=>{const n=e.data,s=n.jsonData;if(n&&"blue-marble"===n.source)switch(n.endpoint.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).pop()){case"me":if(s.status&&"2"!=s.status?.toString()[0])return void t.X("The game is down!\nCould not fetch userdata.");const e=Math.ceil(Math.pow(Math.floor(s.level)*Math.pow(30,.65),1/.65)-s.pixelsPainted),o=console.log;o(s),o(s?.droplets),t.R("bm-user-name",`Username: ${i.h(s.name)}`),t.R("bm-user-droplets",`Droplets: ${(new Intl.NumberFormat).format(s.droplets)}`),t.R("bm-user-nextlevel",`Next level in ${(new Intl.NumberFormat).format(e)} pixel${1==e?"":"s"}`);break;case"pixel":const r=n.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),a=new URLSearchParams(n.endpoint.split("?")[1]),c=[a.get("x"),a.get("y")];this.F=[...r,...c];const h=this._.Y(r,c),d=document.querySelectorAll("span");for(const t of d)if(t.textContent.trim().includes(`${h[0]}, ${h[1]}`)){let e=document.querySelector("#bm-display-coords");const n=`(Tl X: ${r[0]}, Tl Y: ${r[1]}, Px X: ${c[0]}, Px Y: ${c[1]})`;e?e.textContent=n:(e=document.createElement("span"),e.id="bm-display-coords",e.textContent=n,e.style="margin-left: calc(var(--spacing)*3); font-size: small;",t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",e))}break;case"robots":this.q="false"==s.userscript?.toString().toLowerCase()}})}}(d);h.$(l),h.I({id:"bm-overlay",style:"top: 10px; right: 75px;"}).I({id:"bm-contain-header"}).I({id:"bm-bar-drag"}).T().N({alt:"Blue Marble Icon",src:"https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/src/assets/Favicon.png"}).T().L(1,{textContent:o}).T().T().S().T().I({id:"bm-contain-userinfo"}).H({id:"bm-user-name",textContent:"Username:"}).T().H({id:"bm-user-droplets",textContent:"Droplets:"}).T().H({id:"bm-user-nextlevel",textContent:"Next level in..."}).T().T().S().T().I({id:"bm-contain-automation"}).D({id:"bm-input-stealth",textContent:"Stealth",checked:!0}).T().O({title:"Waits for the website to make requests, instead of sending requests."}).T().B().T().D({id:"bm-input-possessed",textContent:"Possessed",checked:!0}).T().O({title:"Controls the website as if it were possessed."}).T().B().T().I({id:"bm-contain-coords"}).P({id:"bm-button-coords",className:"bm-help",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.M?.F;e?.[0]?(t.R("bm-input-tx",e?.[0]||""),t.R("bm-input-ty",e?.[1]||""),t.R("bm-input-px",e?.[2]||""),t.R("bm-input-py",e?.[3]||"")):t.X("Coordinates are malformed! Did you try clicking on the canvas first?")}}).T().j({type:"number",id:"bm-input-tx",placeholder:"Tl X",min:0,max:2047,step:1}).T().j({type:"number",id:"bm-input-ty",placeholder:"Tl Y",min:0,max:2047,step:1}).T().j({type:"number",id:"bm-input-px",placeholder:"Px X",min:0,max:2047,step:1}).T().j({type:"number",id:"bm-input-py",placeholder:"Px Y",min:0,max:2047,step:1}).T().T().G({id:"bm-input-file-template",textContent:"Upload Template"}).T().I({id:"bm-contain-buttons"}).P({id:"bm-button-enable",textContent:"Enable"}).T().P({id:"bm-button-disable",textContent:"Disable"}).T().T().U({id:h.C,placeholder:`Status: Sleeping...\nVersion: ${r}`,readOnly:!0}).T().T().k(document.body),h.W("#bm-overlay","#bm-bar-drag"),l.V(h)})(); -//# sourceMappingURL=https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/ec27053dc24cfdf704786094e83be13f32094615/dist/BlueMarble.user.js.map \ No newline at end of file +(()=>{var t,e,n=t=>{throw TypeError(t)},s=(t,e,s)=>(((t,e)=>{e.has(t)||n("Cannot access private method")})(t,e),s);t=new WeakSet,e=function(t,e={},n={}){const s=document.createElement(t);this.t?(this.i.appendChild(s),this.o.push(this.i),this.i=s):(this.t=s,this.i=s);for(const[t,n]of Object.entries(e))s[t]=n;for(const[t,e]of Object.entries(n))s[t]=e;return s};var i=class{static h(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}},o=GM_info.script.name.toString(),a=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.textContent=`(${t})();`,document.documentElement.appendChild(e),e.remove()}(()=>{const t=window.fetch;window.fetch=async function(...e){const n=await t.apply(this,e),s=n.clone();if((s.headers.get("content-type")||"").includes("application/json")){let t=(e[0]instanceof Request?e[0]?.url:e[0])||"ignore";console.log(`Sending JSON message about endpoint "${t}"`),s.json().then(e=>{window.postMessage({source:"blue-marble",endpoint:t,jsonData:e},"*")}).catch(t=>{console.error("BM - Failed to parse JSON:",t)})}return n}});var r=GM_getResourceText("CSS-BM-File");GM_addStyle(r);var c=document.createElement("link");c.href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap",c.rel="preload",c.as="style",c.onload=function(){this.onload=null,this.rel="stylesheet"},document.head.appendChild(c),new class{constructor(){this.l=null,this.u=null,this.m="#bm-display-coords"}p(t){return this.u=t,this.l=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.m)}),this}v(){return this.l}observe(t,e=!1,n=!1){t.observe(this.u,{childList:e,subtree:n})}};var h=new class{constructor(e,s){var i,o;i=this,(o=t).has(i)?n("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,undefined),this.name=e,this.version=s,this.$=null,this.M="bm-output-status",this.t=null,this.i=null,this.o=[]}C(t){this.$=t}T(){return this.o.length>0&&(this.i=this.o.pop()),this}k(t){t.appendChild(this.t),this.t=null,this.i=null,this.o=[]}N(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"div",{},n)),this}S(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"p",{},n)),this}I(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"img",{},n)),this}H(n,i={},o=()=>{}){return o(this,s(this,t,e).call(this,"h"+n,{},i)),this}B(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"hr",{},n)),this}L(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"br",{},n)),this}D(n={},i=()=>{}){const o=s(this,t,e).call(this,"label",{textContent:n.textContent??""});delete n.textContent;const a=s(this,t,e).call(this,"input",{type:"checkbox"},n);return o.insertBefore(a,o.firstChild),this.T(),i(this,o,a),this}O(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"button",{},n)),this}P(n={},i=()=>{}){const o=n.title??n.textContent??"Help: No info";delete n.textContent,n.title=`Help: ${o}`;const a={textContent:"?",className:"bm-help",onclick:()=>{this.R(this.M,o)}};return i(this,s(this,t,e).call(this,"button",a,n)),this}j(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"input",{},n)),this}F(n={},i=()=>{}){const o=n.textContent??"";delete n.textContent;const a=s(this,t,e).call(this,"div"),r=s(this,t,e).call(this,"input",{type:"file",style:"display: none;"},n);this.T();const c=s(this,t,e).call(this,"button",{textContent:o});return this.T(),this.T(),c.addEventListener("click",()=>{r.click()}),r.addEventListener("change",()=>{c.style.maxWidth=`${c.offsetWidth}px`,r.files.length>0?c.textContent=r.files[0].name:c.textContent=o}),i(this,a,r,c),this}G(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"textarea",{},n)),this}R(t,e,n=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:n?s.textContent=e:s.innerHTML=e)}U(t,e){let n,s=!1,i=0;t=document.querySelector("#"==t?.[0]?t:"#"+t),e=document.querySelector("#"==e?.[0]?e:"#"+e),t&&e?(e.addEventListener("mousedown",function(o){s=!0,n=o.clientX-t.getBoundingClientRect().left,i=o.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging")}),e.addEventListener("touchstart",function(o){s=!0;const a=o?.touches?.[0];a&&(n=a.clientX-t.getBoundingClientRect().left,i=a.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging"))},{passive:!1}),document.addEventListener("mousemove",function(e){s&&(t.style.left=e.clientX-n+"px",t.style.top=e.clientY-i+"px",t.style.right="")}),document.addEventListener("touchmove",function(e){if(s){const s=e?.touches?.[0];if(!s)return;t.style.left=s.clientX-n+"px",t.style.top=s.clientY-i+"px",e.preventDefault()}},{passive:!1}),document.addEventListener("mouseup",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchend",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchcancel",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")})):this.W(`Can not drag! ${t?"":"moveMe"} ${t||e?"":"and "}${e?"":"iMoveThings "}was not found!`)}W(t){(0,console.error)(`${this.name}: ${t}`),this.R(this.M,"Error: "+t,!0)}}(o,a),d=new class{X(t,e){return[parseInt(t[0])%4*1e3+parseInt(e[0]),parseInt(t[1])%4*1e3+parseInt(e[1])]}},l=new class{constructor(t){this.Y=t,this._=!1,this.q=[]}J(t){window.addEventListener("message",e=>{const n=e.data,s=n.jsonData;if(!n||"blue-marble"!==n.source)return;const o=n.endpoint.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).pop();switch(console.log(`Recieved message about "${o}"`),o){case"me":if(s.status&&"2"!=s.status?.toString()[0])return void t.W("The game is down!\nCould not fetch userdata.");const e=Math.ceil(Math.pow(Math.floor(s.level)*Math.pow(30,.65),1/.65)-s.pixelsPainted),o=console.log;o(s),o(s?.droplets),t.R("bm-user-name",`Username: ${i.h(s.name)}`),t.R("bm-user-droplets",`Droplets: ${(new Intl.NumberFormat).format(s.droplets)}`),t.R("bm-user-nextlevel",`Next level in ${(new Intl.NumberFormat).format(e)} pixel${1==e?"":"s"}`);break;case"pixel":const a=n.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),r=new URLSearchParams(n.endpoint.split("?")[1]),c=[r.get("x"),r.get("y")];this.q=[...a,...c];const h=this.Y.X(a,c),d=document.querySelectorAll("span");for(const t of d)if(t.textContent.trim().includes(`${h[0]}, ${h[1]}`)){let e=document.querySelector("#bm-display-coords");const n=`(Tl X: ${a[0]}, Tl Y: ${a[1]}, Px X: ${c[0]}, Px Y: ${c[1]})`;e?e.textContent=n:(e=document.createElement("span"),e.id="bm-display-coords",e.textContent=n,e.style="margin-left: calc(var(--spacing)*3); font-size: small;",t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",e))}break;case"robots":this._="false"==s.userscript?.toString().toLowerCase();break}})}}(d);h.C(l),h.N({id:"bm-overlay",style:"top: 10px; right: 75px;"}).N({id:"bm-contain-header"}).N({id:"bm-bar-drag"}).T().I({alt:"Blue Marble Icon",src:"https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/src/assets/Favicon.png"}).T().H(1,{textContent:o}).T().T().B().T().N({id:"bm-contain-userinfo"}).S({id:"bm-user-name",textContent:"Username:"}).T().S({id:"bm-user-droplets",textContent:"Droplets:"}).T().S({id:"bm-user-nextlevel",textContent:"Next level in..."}).T().T().B().T().N({id:"bm-contain-automation"}).D({id:"bm-input-stealth",textContent:"Stealth",checked:!0}).T().P({title:"Waits for the website to make requests, instead of sending requests."}).T().L().T().D({id:"bm-input-possessed",textContent:"Possessed",checked:!0}).T().P({title:"Controls the website as if it were possessed."}).T().L().T().N({id:"bm-contain-coords"}).O({id:"bm-button-coords",className:"bm-help",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.$?.q;e?.[0]?(t.R("bm-input-tx",e?.[0]||""),t.R("bm-input-ty",e?.[1]||""),t.R("bm-input-px",e?.[2]||""),t.R("bm-input-py",e?.[3]||"")):t.W("Coordinates are malformed! Did you try clicking on the canvas first?")}}).T().j({type:"number",id:"bm-input-tx",placeholder:"Tl X",min:0,max:2047,step:1}).T().j({type:"number",id:"bm-input-ty",placeholder:"Tl Y",min:0,max:2047,step:1}).T().j({type:"number",id:"bm-input-px",placeholder:"Px X",min:0,max:2047,step:1}).T().j({type:"number",id:"bm-input-py",placeholder:"Px Y",min:0,max:2047,step:1}).T().T().F({id:"bm-input-file-template",textContent:"Upload Template"}).T().N({id:"bm-contain-buttons"}).O({id:"bm-button-enable",textContent:"Enable"}).T().O({id:"bm-button-disable",textContent:"Disable"}).T().T().G({id:h.M,placeholder:`Status: Sleeping...\nVersion: ${a}`,readOnly:!0}).T().T().k(document.body),h.U("#bm-overlay","#bm-bar-drag"),l.J(h),console.log(`${o} (${a}) userscript has loaded!`)})(); +//# sourceMappingURL= \ No newline at end of file diff --git a/dist/BlueMarble.user.js.map b/dist/BlueMarble.user.js.map index 5f080bc..48ecc7c 100644 --- a/dist/BlueMarble.user.js.map +++ b/dist/BlueMarble.user.js.map @@ -1 +1 @@ -{"version":3,"file":"dist/BlueMarble.user.js","names":["_Overlay_instances","createElement_fn","__typeError","msg","TypeError","__privateMethod","obj","member","method","has","__accessCheck","WeakSet","tag","properties","additionalProperties","element","document","createElement","this","overlay","currentParent","appendChild","parentStack","push","property","value","Object","entries","Utils","escapeHTML","text","div","textContent","innerHTML","name","GM_info","script","toString","version","fn","documentElement","remove","inject","originalFetch","window","fetch","async","args","response","apply","cloned","clone","headers","get","includes","endpointName","Request","url","json","then","jsonData","postMessage","source","endpoint","catch","err","cssOverlay","GM_getResourceText","GM_addStyle","stylesheetLink","href","rel","as","onload","head","constructor","observerBody","observerBodyTarget","targetDisplayCoords","createObserverBody","target","MutationObserver","mutations","mutation","node","addedNodes","HTMLElement","matches","getObserverBody","observe","observer","watchChildList","watchSubtree","childList","subtree","name2","version2","add","set","apiHandler","outputStatusId","setApiHandler","apiHandler2","buildElement","length","pop","buildOverlay","parent","addDiv","callback","call","addP","addImg","addHeader","level","addHr","addBr","addCheckbox","label","checkbox","type","insertBefore","firstChild","addButton","addButtonHelp","tooltip","className","onclick","updateInnerHTML","addInput","addInputFile","container","input","style","button","addEventListener","click","maxWidth","offsetWidth","files","addTextarea","id","html","doSafe","getElementById","replace","HTMLInputElement","handleDrag","moveMe","iMoveThings","offsetX","isDragging","offsetY","querySelector","event","clientX","getBoundingClientRect","left","clientY","top","body","userSelect","classList","touch","touches","passive","right","preventDefault","handleDisplayError","consoleError","console","error","coordsHandler","serverTPtoDisplayTP","tile","pixel","parseInt","coordsHandler2","disableAll","coordsTilePixel","spontaneousResponseListener","overlay2","data","dataJSON","split","filter","s","isNaN","Number","nextLevelPixels","Math","ceil","pow","floor","clog","log","droplets","Intl","NumberFormat","format","coordsTile","payloadExtractor","URLSearchParams","coordsPixel","displayTP","spanElements","querySelectorAll","trim","displayCoords","parentNode","insertAdjacentElement","toLowerCase","alt","src","checked","title","instance","coords","placeholder","min","max","step","readOnly"],"sources":["0"],"mappings":"AAAA,MACE,IAQIA,EAAoBC,EARpBC,EAAeC,IACjB,MAAMC,UAAUD,IAIdE,EAAkB,CAACC,EAAKC,EAAQC,KAFhB,EAACF,EAAKC,KAAgBA,EAAOE,IAAIH,IAAQJ,EAAY,iCAEzBQ,CAAcJ,EAAKC,GAAkCC,GA0erGR,EAAqB,IAAIW,QAQzBV,EAAmB,SAASW,EAAKC,EAAa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B,EAAU,CAAEkB,GAAM,oBAAqB7G,YAAe,YAAauE,IAAeA,IAAeqC,EAAY,CAAEC,GAAM1H,EAAQiF,EAAgBsH,YAAe,iCAC53BpL,IAAWwL,UAAY,IAAQvH,IAAeA,IAAeG,EAAa1F,SAASgJ,MAC5F7I,EAAQgI,EAAW,cAAe,gBAClChD,EAAWiF,EAA4BjK,EAExC,EAlvBD","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"BlueMarble.user.js","names":["_Overlay_instances","createElement_fn","WeakSet","tag","properties","additionalProperties","element","document","createElement","this","overlay","currentParent","appendChild","parentStack","push","property","value","Object","entries","Utils","escapeHTML","text","div","textContent","innerHTML","name","GM_info","script","toString","version","fn","documentElement","remove","inject","originalFetch","window","fetch","async","args","response","apply","cloned","clone","headers","get","includes","endpointName","Request","url","console","log","json","then","jsonData","postMessage","source","endpoint","catch","err","error","cssOverlay","GM_getResourceText","GM_addStyle","stylesheetLink","href","rel","as","onload","head","constructor","observerBody","observerBodyTarget","targetDisplayCoords","createObserverBody","target","MutationObserver","mutations","mutation","node","addedNodes","HTMLElement","matches","getObserverBody","observe","observer","watchChildList","watchSubtree","childList","subtree","apiHandler","outputStatusId","setApiHandler","buildElement","length","pop","buildOverlay","parent","addDiv","callback","__privateMethod","call","addP","addImg","addHeader","level","addHr","addBr","addCheckbox","label","checkbox","type","insertBefore","firstChild","addButton","addButtonHelp","tooltip","className","onclick","updateInnerHTML","addInput","addInputFile","container","input","style","button","addEventListener","click","maxWidth","offsetWidth","files","addTextarea","id","html","doSafe","getElementById","replace","HTMLInputElement","handleDrag","moveMe","iMoveThings","offsetX","isDragging","offsetY","querySelector","event","clientX","getBoundingClientRect","left","clientY","top","body","userSelect","classList","add","touch","touches","passive","right","preventDefault","handleDisplayError","consoleError","coordsHandler","serverTPtoDisplayTP","tile","pixel","parseInt","disableAll","coordsTilePixel","spontaneousResponseListener","data","dataJSON","endpointText","split","filter","s","isNaN","Number","nextLevelPixels","Math","ceil","pow","floor","clog","droplets","Intl","NumberFormat","format","coordsTile","payloadExtractor","URLSearchParams","coordsPixel","displayTP","spanElements","querySelectorAll","trim","displayCoords","parentNode","insertAdjacentElement","toLowerCase","alt","src","checked","title","instance","coords","placeholder","min","max","step","readOnly"],"sources":["../src/overlay.js","../src/observers.js","../src/utils.js","../src/main.js","../src/coordsHandler.js","../src/apiHandler.js"],"sourcesContent":["/** The overlay builder for the Blue Marble script.\r\n * @description This class handles the overlay UI for the Blue Marble script.\r\n * @since 0.0.2\r\n * @example\r\n * const overlay = new Overlay();\r\n * overlay.addDiv('overlay')\r\n * .addHeader(1, {'textContent': 'Your Overlay'}).buildElement()\r\n * .addP({'textContent': 'This is your overlay. It is versatile.'}).buildElement()\r\n * .addHr().buildElement()\r\n * .buildOverlay(document.body);\r\n * // Output:\r\n * // (Assume
already exists in the webpage)\r\n * \r\n *This is your overlay. It is versatile.
\r\n *\r\n * .buildElement() // Breaks out of the
` to the overlay.\r\n * This `
` element will have properties shared between all `
` elements in the overlay.\r\n * You can override the shared properties by using a callback.\r\n * @param {Object. ` that are NOT shared between all overlay ` ` elements. These should be camelCase.\r\n * @param {function(Overlay, HTMLParagraphElement):void} [callback=()=>{}] - Additional JS modification to the ` `.\r\n * @returns {Overlay} Overlay class instance (this)\r\n * @since 0.43.2\r\n * @example\r\n * // Assume all elements have a shared class (e.g. {'className': 'bar'})\r\n * overlay.addP({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);\r\n * // Output:\r\n * // (Assume DOM properties\r\n\r\n const p = this.#createElement('p', properties, additionalProperties); // Creates the element\r\n callback(this, p); // Runs any script passed in through the callback\r\n return this;\r\n }\r\n\r\n /** Adds a `` to the overlay.\r\n * This `
` element will have properties shared between all `
` elements in the overlay.\r\n * You can override the shared properties by using a callback.\r\n * @param {Object.
` that are NOT shared between all overlay `
` elements. These should be camelCase.\r\n * @param {function(Overlay, HTMLImageElement):void} [callback=()=>{}] - Additional JS modification to the `
`.\r\n * @returns {Overlay} Overlay class instance (this)\r\n * @since 0.43.2\r\n * @example\r\n * // Assume all
elements have a shared class (e.g. {'className': 'bar'})\r\n * overlay.addimg({'id': 'foo', 'src': './img.png'}).buildOverlay(document.body);\r\n * // Output:\r\n * // (Assume already exists in the webpage)\r\n * \r\n *
\r\n * \r\n */\r\n addImg(additionalProperties = {}, callback = () => {}) {\r\n\r\n const properties = {}; // Shared DOM properties\r\n\r\n const img = this.#createElement('img', properties, additionalProperties); // Creates the
element\r\n callback(this, img); // Runs any script passed in through the callback\r\n return this;\r\n }\r\n\r\n /** Adds a header to the overlay.\r\n * This header element will have properties shared between all header elements in the overlay.\r\n * You can override the shared properties by using a callback.\r\n * @param {number} level - The header level. Must be between 1 and 6 (inclusive)\r\n * @param {Object.
Foobar.
\r\n * \r\n */\r\n addHeader(level, additionalProperties = {}, callback = () => {}) {\r\n\r\n const properties = {}; // Shared header DOM properties\r\n\r\n const header = this.#createElement('h' + level, properties, additionalProperties); // Creates the header element\r\n callback(this, header); // Runs any script passed in through the callback\r\n return this;\r\n }\r\n\r\n /** Adds a `
` to the overlay.\r\n * This `
` element will have properties shared between all `
` elements in the overlay.\r\n * You can override the shared properties by using a callback.\r\n * @param {Object.
` that are NOT shared between all overlay `
` elements. These should be camelCase.\r\n * @param {function(Overlay, HTMLHRElement):void} [callback=()=>{}] - Additional JS modification to the `
`.\r\n * @returns {Overlay} Overlay class instance (this)\r\n * @since 0.43.7\r\n * @example\r\n * // Assume all
elements have a shared class (e.g. {'className': 'bar'})\r\n * overlay.addhr({'id': 'foo'}).buildOverlay(document.body);\r\n * // Output:\r\n * // (Assume already exists in the webpage)\r\n * \r\n *
\r\n * \r\n */\r\n addHr(additionalProperties = {}, callback = () => {}) {\r\n\r\n const properties = {}; // Shared
DOM properties\r\n\r\n const hr = this.#createElement('hr', properties, additionalProperties); // Creates the
element\r\n callback(this, hr); // Runs any script passed in through the callback\r\n return this;\r\n }\r\n\r\n /** Adds a `
` to the overlay.\r\n * This `
` element will have properties shared between all `
` elements in the overlay.\r\n * You can override the shared properties by using a callback.\r\n * @param {Object.
` that are NOT shared between all overlay `
` elements. These should be camelCase.\r\n * @param {function(Overlay, HTMLBRElement):void} [callback=()=>{}] - Additional JS modification to the `
`.\r\n * @returns {Overlay} Overlay class instance (this)\r\n * @since 0.43.11\r\n * @example\r\n * // Assume all
elements have a shared class (e.g. {'className': 'bar'})\r\n * overlay.addbr({'id': 'foo'}).buildOverlay(document.body);\r\n * // Output:\r\n * // (Assume already exists in the webpage)\r\n * \r\n *
\r\n * \r\n */\r\n addBr(additionalProperties = {}, callback = () => {}) {\r\n\r\n const properties = {}; // Shared
DOM properties\r\n\r\n const br = this.#createElement('br', properties, additionalProperties); // Creates the
element\r\n callback(this, br); // Runs any script passed in through the callback\r\n return this;\r\n }\r\n\r\n /** Adds a checkbox to the overlay.\r\n * This checkbox element will have properties shared between all checkbox elements in the overlay.\r\n * You can override the shared properties by using a callback. Note: the checkbox element is inside a label element.\r\n * @param {Object.