// ==UserScript== // @name Tile Exporter // @namespace http://tampermonkey.net/ // @version 1.0 // @description Adaptive tile downloader with live progress, preview, and PNG export. // @author bautti_. // @match https://wplace.live/* // @grant GM_addStyle // @icon https://files.catbox.moe/bylc9c.png // @updateURL https://raw.githubusercontent.com/cuenta-ppf-10/Tile-Exporter-Wplace/main/tile-downloader.js // @downloadURL https://raw.githubusercontent.com/cuenta-ppf-10/Tile-Exporter-Wplace/main/tile-downloader.js // ==/UserScript== (function(_0x499fe8,_0x30537d){const _0x1e93dc=_0x3351,_0x13810a=_0x499fe8();while(!![]){try{const _0x5ba202=-parseInt(_0x1e93dc(0x226))/0x1*(parseInt(_0x1e93dc(0x1f1))/0x2)+-parseInt(_0x1e93dc(0x206))/0x3*(-parseInt(_0x1e93dc(0x205))/0x4)+-parseInt(_0x1e93dc(0x21a))/0x5*(-parseInt(_0x1e93dc(0x202))/0x6)+-parseInt(_0x1e93dc(0x21d))/0x7+parseInt(_0x1e93dc(0x219))/0x8+parseInt(_0x1e93dc(0x22d))/0x9*(-parseInt(_0x1e93dc(0x200))/0xa)+parseInt(_0x1e93dc(0x1da))/0xb;if(_0x5ba202===_0x30537d)break;else _0x13810a['push'](_0x13810a['shift']());}catch(_0xa61a54){_0x13810a['push'](_0x13810a['shift']());}}}(_0x129e,0x609ed),(function(){'use strict';const _0x2e5e2c=_0x3351;const _0x577a48=_0x2e5e2c(0x1fb),_0x3b2010=0x5,_0x3316ef=0x1f4,_0x5c8ddb=_0x2e5e2c(0x1d7);document[_0x2e5e2c(0x1f0)][_0x2e5e2c(0x209)](_0x2e5e2c(0x1f7),_0x5c8ddb),GM_addStyle(_0x2e5e2c(0x227));const _0x4c1a22=document[_0x2e5e2c(0x1d9)](_0x2e5e2c(0x1eb)),_0x3634fa=document[_0x2e5e2c(0x1d9)](_0x2e5e2c(0x1dc)),_0x22011f=document[_0x2e5e2c(0x1d9)](_0x2e5e2c(0x1fa)),_0x1e2222=document[_0x2e5e2c(0x1d9)](_0x2e5e2c(0x1df)),_0xd3f130=document[_0x2e5e2c(0x1d9)](_0x2e5e2c(0x1e1));let _0x3929d0=0x0,_0x48d409=0x0;_0x3634fa['addEventListener'](_0x2e5e2c(0x22a),()=>{const _0x299607=_0x2e5e2c;_0x4c1a22[_0x299607(0x1fe)]['toggle']('minimized'),_0x3634fa[_0x299607(0x210)]=_0x4c1a22[_0x299607(0x1fe)]['contains'](_0x299607(0x215))?_0x299607(0x1f9):'▼',_0x37290f();});let _0x187b4e=![],_0x16ceaa,_0x58e874;_0x4c1a22[_0x2e5e2c(0x1d8)](_0x2e5e2c(0x1dd))['addEventListener'](_0x2e5e2c(0x1f2),_0x176591=>{const _0x512402=_0x2e5e2c;if(_0x176591[_0x512402(0x22b)][_0x512402(0x1fd)]===_0x512402(0x1f8))return;_0x187b4e=!![],_0x16ceaa=_0x176591['clientX']-_0x4c1a22['offsetLeft'],_0x58e874=_0x176591['clientY']-_0x4c1a22['offsetTop'],_0x4c1a22['style'][_0x512402(0x225)]=_0x512402(0x216),_0x176591[_0x512402(0x20e)]();}),document[_0x2e5e2c(0x217)](_0x2e5e2c(0x1e7),_0x617c0e=>{const _0x4fa3d2=_0x2e5e2c;if(!_0x187b4e)return;let _0x21a143=Math[_0x4fa3d2(0x20a)](Math['max'](0x0,_0x617c0e[_0x4fa3d2(0x218)]-_0x16ceaa),window[_0x4fa3d2(0x222)]-_0x4c1a22[_0x4fa3d2(0x221)]),_0xf7950f=Math['min'](Math[_0x4fa3d2(0x1f6)](0x0,_0x617c0e['clientY']-_0x58e874),window[_0x4fa3d2(0x1e8)]-_0x4c1a22['offsetHeight']);_0x4c1a22['style']['left']=_0x21a143+'px',_0x4c1a22[_0x4fa3d2(0x204)][_0x4fa3d2(0x1e2)]=_0xf7950f+'px';}),document[_0x2e5e2c(0x217)](_0x2e5e2c(0x21f),()=>{const _0x12e107=_0x2e5e2c;_0x187b4e&&(_0x187b4e=![],_0x4c1a22[_0x12e107(0x204)]['transition']='all\x200.4s\x20ease');});function _0x37290f(){const _0xabdc96=_0x2e5e2c;if(!_0x3929d0||!_0x48d409)return;const _0x246028=_0x22011f[_0xabdc96(0x228)],_0x1f1439=_0x246028[_0xabdc96(0x1d8)]('h3')[_0xabdc96(0x21b)],_0x22ff33=_0x246028[_0xabdc96(0x1d8)](_0xabdc96(0x1e5))['offsetHeight'];let _0x8d39a0=_0x246028[_0xabdc96(0x1e4)],_0xe1e937=_0x246028[_0xabdc96(0x1ff)]-_0x1f1439-_0x22ff33-0xa;const _0x1d2071=_0x48d409/_0x3929d0;let _0x566a26=_0x8d39a0,_0x2b962e=_0x566a26*_0x1d2071;_0x2b962e>_0xe1e937&&(_0x2b962e=_0xe1e937,_0x566a26=_0x2b962e/_0x1d2071);_0x22011f[_0xabdc96(0x207)]=_0x566a26,_0x22011f[_0xabdc96(0x1e9)]=_0x2b962e;if(_0x22011f[_0xabdc96(0x20d)]){const _0x5a7be0=_0x22011f[_0xabdc96(0x214)]('2d');_0x5a7be0['clearRect'](0x0,0x0,_0x566a26,_0x2b962e),_0x5a7be0['drawImage'](_0x22011f[_0xabdc96(0x20d)],0x0,0x0,_0x566a26,_0x2b962e);}}async function _0xf84301(_0x346a03,_0x48b245){const _0x5c359a=_0x2e5e2c,_0x1edb39=_0x577a48['replace'](_0x5c359a(0x1ee),_0x346a03)['replace']('{y}',_0x48b245);for(let _0x588a30=0x0;_0x588a30<_0x3b2010;_0x588a30++){try{const _0x47142d=await fetch(_0x1edb39);if(!_0x47142d['ok'])throw new Error(_0x5c359a(0x1ef)+_0x47142d[_0x5c359a(0x1fc)]);return await createImageBitmap(await _0x47142d['blob']());}catch(_0x38ff62){console[_0x5c359a(0x1e3)](_0x5c359a(0x20b)+_0x346a03+'_'+_0x48b245+_0x5c359a(0x1f5)+(_0x588a30+0x1)+':\x20'+_0x38ff62),await new Promise(_0x175324=>setTimeout(_0x175324,0x3e8));}}return null;}async function _0x4a4353(_0x234a09,_0x508417,_0x38644a,_0x1c06aa){const _0x430fe5=_0x2e5e2c,[_0x48cfbf,_0x462b66]=_0x234a09,[_0x3eaf80,_0x17c1ae]=_0x38644a,[_0x58309b,_0x20ad90]=_0x508417,[_0x2b1013,_0x5dec78]=_0x1c06aa,_0x2d73a3=document[_0x430fe5(0x1d9)](_0x430fe5(0x1f4)),_0x363150=(_0x3eaf80-_0x48cfbf+0x1)*(_0x17c1ae-_0x462b66+0x1);let _0x17f651=0x0;const _0x596366=[];for(let _0x4f80c1=_0x462b66;_0x4f80c1<=_0x17c1ae;_0x4f80c1++){for(let _0x327ff9=_0x48cfbf;_0x327ff9<=_0x3eaf80;_0x327ff9++){_0x2d73a3[_0x430fe5(0x21e)]=_0x430fe5(0x212)+_0x327ff9+'_'+_0x4f80c1+_0x430fe5(0x213);const _0x5cac55=await _0xf84301(_0x327ff9,_0x4f80c1);if(_0x5cac55)_0x596366[_0x430fe5(0x20f)]({'x':_0x327ff9,'y':_0x4f80c1,'img':_0x5cac55});_0x17f651++;const _0x1cba85=Math[_0x430fe5(0x223)](_0x17f651/_0x363150*0x64);_0x1e2222[_0x430fe5(0x21e)]=_0x1cba85+'%',_0xd3f130[_0x430fe5(0x204)][_0x430fe5(0x207)]=_0x1cba85+'%',await new Promise(_0x1109f5=>setTimeout(_0x1109f5,_0x3316ef));}}if(!_0x596366['length']){_0x2d73a3['textContent']=_0x430fe5(0x201);return;}const _0x4b3dfe=_0x596366[0x0][_0x430fe5(0x1ea)][_0x430fe5(0x207)],_0x4afd76=_0x596366[0x0][_0x430fe5(0x1ea)][_0x430fe5(0x1e9)],_0x415ef2=(_0x3eaf80-_0x48cfbf+0x1)*_0x4b3dfe,_0x46ea87=(_0x17c1ae-_0x462b66+0x1)*_0x4afd76,_0x2a60fe=document[_0x430fe5(0x1de)]('canvas');_0x2a60fe[_0x430fe5(0x207)]=_0x415ef2,_0x2a60fe[_0x430fe5(0x1e9)]=_0x46ea87;const _0x5ed31b=_0x2a60fe['getContext']('2d');_0x596366[_0x430fe5(0x208)](_0x279b32=>_0x5ed31b[_0x430fe5(0x211)](_0x279b32['img'],(_0x279b32['x']-_0x48cfbf)*_0x4b3dfe,(_0x279b32['y']-_0x462b66)*_0x4afd76));const _0x43be07=(_0x3eaf80-_0x48cfbf)*_0x4b3dfe+_0x2b1013-_0x58309b,_0x2ac62b=(_0x17c1ae-_0x462b66)*_0x4afd76+_0x5dec78-_0x20ad90,_0x14d047=document[_0x430fe5(0x1de)]('canvas');_0x14d047[_0x430fe5(0x207)]=_0x43be07,_0x14d047['height']=_0x2ac62b,_0x14d047[_0x430fe5(0x214)]('2d')[_0x430fe5(0x211)](_0x2a60fe,_0x58309b,_0x20ad90,_0x43be07,_0x2ac62b,0x0,0x0,_0x43be07,_0x2ac62b),_0x22011f[_0x430fe5(0x20d)]=_0x14d047,_0x3929d0=_0x43be07,_0x48d409=_0x2ac62b,_0x37290f(),_0x2d73a3['textContent']=_0x430fe5(0x220),_0x1e2222[_0x430fe5(0x21e)]=_0x430fe5(0x20c),_0xd3f130[_0x430fe5(0x204)]['width']='100%';}document[_0x2e5e2c(0x1d9)]('tm-download-btn')[_0x2e5e2c(0x217)](_0x2e5e2c(0x22a),()=>{const _0x3fb650=_0x2e5e2c,_0x1679f4=document[_0x3fb650(0x1d9)](_0x3fb650(0x1db))['value']['trim']()['split']('_')[_0x3fb650(0x224)](Number),_0x43c598=document[_0x3fb650(0x1d9)](_0x3fb650(0x1e6))['value'][_0x3fb650(0x229)]()[_0x3fb650(0x21c)]('_')[_0x3fb650(0x224)](Number);if(_0x1679f4[_0x3fb650(0x1f3)]!==0x4||_0x43c598[_0x3fb650(0x1f3)]!==0x4){alert(_0x3fb650(0x1e0));return;}_0x4a4353([_0x1679f4[0x0],_0x1679f4[0x1]],[_0x1679f4[0x2],_0x1679f4[0x3]],[_0x43c598[0x0],_0x43c598[0x1]],[_0x43c598[0x2],_0x43c598[0x3]]);}),document[_0x2e5e2c(0x1d9)](_0x2e5e2c(0x22c))[_0x2e5e2c(0x217)](_0x2e5e2c(0x22a),()=>{const _0x320ba0=_0x2e5e2c;if(!_0x22011f[_0x320ba0(0x20d)])return alert(_0x320ba0(0x1ed));const _0x5e0089=document['createElement']('canvas');_0x5e0089[_0x320ba0(0x207)]=_0x22011f[_0x320ba0(0x20d)][_0x320ba0(0x207)],_0x5e0089[_0x320ba0(0x1e9)]=_0x22011f[_0x320ba0(0x20d)][_0x320ba0(0x1e9)],_0x5e0089[_0x320ba0(0x214)]('2d')[_0x320ba0(0x211)](_0x22011f[_0x320ba0(0x20d)],0x0,0x0);const _0x38a1cd=document[_0x320ba0(0x1de)]('a');_0x38a1cd['download']='tiles.png',_0x38a1cd[_0x320ba0(0x203)]=_0x5e0089['toDataURL'](_0x320ba0(0x1ec)),_0x38a1cd[_0x320ba0(0x22a)]();});}()));function _0x3351(_0x527d13,_0x2f077b){const _0x129e8f=_0x129e();return _0x3351=function(_0x3351e3,_0x1b0ace){_0x3351e3=_0x3351e3-0x1d7;let _0x18e666=_0x129e8f[_0x3351e3];return _0x18e666;},_0x3351(_0x527d13,_0x2f077b);}function _0x129e(){const _0x4c55cf=['HTTP\x20','body','14OFvlGf','mousedown','length','tm-status','\x20attempt\x20','max','beforeend','INPUT','▲','tm-canvas','https://backend.wplace.live/files/s0/tiles/{x}/{y}.png','status','tagName','classList','clientHeight','1800IfPvuE','❌\x20No\x20tiles\x20downloaded','72ioMFwl','href','style','19144nTgfDu','36dyMoPQ','width','forEach','insertAdjacentHTML','min','Tile\x20','100%','_image','preventDefault','push','innerHTML','drawImage','📥\x20Downloading\x20tile\x20','...','getContext','minimized','none','addEventListener','clientX','1624696veXSet','55595QVZiEc','offsetHeight','split','5257651sWevZK','textContent','mouseup','✅\x20Cropped\x20image\x20ready','offsetWidth','innerWidth','round','map','transition','109657HudHSD','\x0a\x20\x20\x20\x20\x20\x20\x20\x20#tm-ui-container\x20{position:fixed;top:70%;left:70%;width:350px;height:auto;background:#1e1e2f;color:#fff;border-radius:15px;box-shadow:0\x2010px\x2030px\x20rgba(0,0,0,0.5);font-family:\x27Segoe\x20UI\x27,Tahoma,Geneva,Verdana,sans-serif;transition:all\x200.4s\x20ease;z-index:9999;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20#tm-ui-container.minimized\x20{width:180px;height:50px;border-radius:25px;overflow:hidden;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-ui-header\x20{display:flex;justify-content:space-between;align-items:center;padding:10px\x2015px;background:linear-gradient(90deg,#4b6cb7,#182848);cursor:grab;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-ui-header\x20h2{margin:0;font-size:1em;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20#tm-ui-toggle{background:transparent;border:none;color:#fff;font-size:1.2em;cursor:pointer;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-ui-content{padding:15px\x2020px;display:block;transition:all\x200.4s\x20ease;width:100%;box-sizing:border-box;max-height:70vh;overflow-y:auto;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20#tm-ui-container.minimized\x20.tm-ui-content{display:none;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-card{display:flex;flex-direction:column;background:#2e2e3e;margin-bottom:15px;padding:15px;border-radius:10px;transition:transform\x200.3s,box-shadow\x200.3s;width:100%;box-sizing:border-box;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-card:hover{transform:translateY(-3px);box-shadow:0\x208px\x2020px\x20rgba(0,0,0,0.4);}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-card-preview{flex:1\x201\x20auto;display:flex;flex-direction:column;overflow:hidden;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20#tm-canvas{flex:1\x201\x20auto;width:100%;border:1px\x20solid\x20#555;display:block;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-btn{background:#4b6cb7;border:none;padding:10px\x2015px;border-radius:8px;color:#fff;cursor:pointer;transition:background\x200.3s;margin-top:5px;flex-shrink:0;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-btn:hover{background:#182848;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20input{width:100%;box-sizing:border-box;margin-bottom:5px;padding:5px;border-radius:5px;border:none;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20input:focus{outline:none;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20label{font-size:0.9em;display:block;margin-top:10px;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20#tm-status{margin-top:5px;font-size:0.9em;color:#4b6cb7;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-stat\x20span{font-size:1em;display:block;margin-bottom:5px;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-progress{width:100%;background:#444;height:10px;border-radius:5px;overflow:hidden;}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tm-progress-bar{height:100%;background:#4b6cb7;width:0%;}','parentElement','trim','click','target','tm-save-btn','9981LnRpSb','\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Tile\x20Exporter

\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20▲\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Download\x20Parts\x20Of\x20The\x20Map

\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Download\x20Tiles\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Download\x20Progress

\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200%\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Preview

\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Save\x20as\x20PNG\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','querySelector','getElementById','18921342mSPElu','tm-start','tm-ui-toggle','.tm-ui-header','createElement','tm-progress-text','Incorrect\x20format.\x20Must\x20be\x204\x20numbers\x20separated\x20by\x20_','tm-progress-bar','top','warn','clientWidth','button','tm-end','mousemove','innerHeight','height','img','tm-ui-container','image/png','No\x20image\x20to\x20save','{x}'];_0x129e=function(){return _0x4c55cf;};return _0x129e();}