Last active
April 27, 2024 08:31
-
-
Save SimplyNo/8f89c851df79d2316b3ea11bfc9b0fbb to your computer and use it in GitHub Desktop.
Evolve Creative Mode (minified)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:!function(){let e=$($("nav")[0].firstChild),t=!1,n=$("#mainColumn > div > div > section");e.append('<li id="hackTab" class><a onClick="openHackTab()">Creative Mode</a></li>'),window.getSession=(()=>JSON.parse(LZString.decompressFromBase64(exportGame()))),window.getKeys=((e,t)=>{let n,a,l=window.getSession();return"*"==e?(a=l,n=Object.keys(a)):"fill"==e?(a=t,n=Object.keys(a)):(a=l[e],n=Object.keys(a)),"object"!=typeof a?0:(n.sort((e,t)=>e.toLowerCase()>t.toLowerCase()?1:t.toLowerCase()>e.toLowerCase()?-1:0),n.length?`<option>${n.join("</option><option>")}</option>`:-1)}),window.handleType=(e=>{let t=$(e.parentElement.parentElement),n=e.value,a=window.getKeys(n);for(;t[0].childElementCount>1;)$(t[0].lastChild).remove();if(-1==a)$(t[0]).append('<td style="border:0;" class="hackItem">n/a</td>'),$(t[0]).append('<td style="border:0;" class="hackProp">n/a</td>'),$(t[0]).append('<td style="border:0;" class="hackVal">n/a</td>'),$(t[0]).append('<td style="border:0;">n/a</td>');else if(a){let e=t.append(`<td style="border:0;"><select onchange="handleItem(this)" class="hackItem">${a}</select></td>`);window.handleItem(e[0].children[1].firstChild)}else $(t[0]).append('<td style="border:0;" class="hackItem">n/a</td>'),$(t[0]).append('<td style="border:0;" class="hackProp">n/a</td>'),$(t[0]).append('<td style="border:0;"><input placeholder="New Value" class="hackVal"></input></td>'),$(t[0]).append(`<td style="border:0;">${window.getSession()[n]}</td>`)}),window.handleItem=(e=>{let t=$(e.parentElement.parentElement),n=t[0].children[0].children[0].value,a=e.value,l=window.getKeys("fill",window.getSession()[n][a]);for(;t[0].childElementCount>2;)$(t[0].lastChild).remove();if(-1==l)$(t[0]).append('<td style="border:0;" class="hackProp">n/a</td>'),$(t[0]).append('<td style="border:0;" class="hackValue">n/a</td>'),$(t[0]).append('<td style="border:0;">n/a</td>');else if(l){let e=t.append(`<td style="border:0;"><select onchange="handleProp(this)" class="hackProp">${l}</select></td>`);window.handleProp(e[0].children[2].firstChild)}else $(t[0]).append('<td style="border:0;" class="hackProp">n/a</td>'),$(t[0]).append('<td style="border:0;"><input placeholder="New Value" class="hackVal"></input></td>'),$(t[0]).append(`<td style="border:0;">${window.getSession()[n][a]}</td>`)}),window.handleProp=(e=>{let t=$(e.parentElement.parentElement),n=t[0].children[0].children[0].value,a=t[0].children[1].children[0].value,l=e.value,s=window.getKeys("fill",window.getSession()[n][a][l]);for(;t[0].childElementCount>3;)$(t[0].lastChild).remove();-1==s?($(t[0]).append('<td style="border:0;" class="hackValue">n/a</td>'),$(t[0]).append('<td style="border:0;" >n/a</td>')):s?alert("oh"):($(t[0]).append('<td style="border:0;"><input placeholder="New Value" class="hackVal"></input></td>'),$(t[0]).append(`<td style="border:0;">${window.getSession()[n][a][l]}</td>`))}),window.newSet=(()=>{let e=$("#hackContent > table > tbody").append(` <tr>\n <td style="border: 0;">\n <select class="hackType" onchange="handleType(this)">\n ${getKeys("*")}\n </select>\n </td>\n</tr>`);window.handleType(e[0].lastChild.children[0].children[0])}),window.save=(()=>{let e=window.getSession();console.log(e.resource.Food.amount),Array.from($("#hackContent > table > tbody")[0].children).forEach((t,n)=>{let a=document.getElementsByClassName("hackType")[n]?document.getElementsByClassName("hackType")[n].value:null,l=document.getElementsByClassName("hackItem")[n]?document.getElementsByClassName("hackItem")[n].value:null,s=document.getElementsByClassName("hackProp")[n]?document.getElementsByClassName("hackProp")[n].value:null,o=document.getElementsByClassName("hackVal")[n]?document.getElementsByClassName("hackVal")[n].value:null;o&&(o=parseInt(o)||o,s?e[a][l][s]=o:l?e[a][l]=o:a&&(e[a]=o))});let t=LZString.compressToBase64(JSON.stringify(e));console.log(e.resource.Food.amount),importGame(t)}),window.openHackTab=(()=>{if(t)return;t=!0,n[0].childNodes.forEach(e=>{"hackContent"!==e.id&&e.setAttribute("style","display: none")}),$("#hackContent")[0].removeAttribute("style"),e[0].childNodes.forEach(e=>{"hackTab"!==e.id?(e.setAttribute("class",""),e.setAttribute("onClick","closeHackTab()")):e.setAttribute("class","is-active")})}),window.closeHackTab=(()=>{t&&(t=!1,e[0].childNodes.forEach(e=>{"hackTab"!==e.id?e.setAttribute("onClick","closeHackTab()"):e.setAttribute("class","")}),$("#hackContent")[0].setAttribute("style","display: none"))}),$(n[0]).append('<div id="hackContent" style="padding: 20px;">\n<span>Evolve Creative Mode\n[made by SimplyNo]</span>\n<table>\n <tr>\n <th style="font-weight: normal;" class="has-text-warning">\n Type\n </th>\n <th style="font-weight: normal;" class="has-text-warning">\n Item\n </th>\n <th style="font-weight: normal;" class="has-text-warning">\n Property\n </th>\n <th style="font-weight: normal;" class="has-text-warning">\n New Value\n </th>\n <th style="font-weight: normal;" class="has-text-success">\n Current Value\n </th>\n\n </tr>\n</table>\n<button class="button" onClick="newSet()">New Set</button>\n<button class="button" onClick="save()" style="float: right;">Save Changes</button>\n\n</div>'),window.openHackTab(),window.newSet()}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment