// ==UserScript== // @name Gota.io Skins Optimiser // @namespace https://skins.gota.io/ // @version 1.0 // @description Turns the skin page into dark theme, re-adjusted fonts and added new skin submission features! // @author alex // @match https://skins.gota.io/* // @grant GM_addStyle // @run-at document-start // @downloadURL none // ==/UserScript== (function() { 'use strict'; window.onload = function() { function assignClass(classname, arg) { if (document.getElementsByClassName(classname) == null) return; document.getElementsByClassName(classname)[0].id = arg; } assignClass(`container theme-showcase`, `skinsBg`); if (window.location.href == `https://skins.gota.io/skin_request.php`) { let newDiv = document.createElement("div"); newDiv.style = `text-align: center`; newDiv.className = "form-group"; newDiv.id = "moreInfo"; newDiv.style.color = "white"; newDiv.style.fontFamily = "Montserrat, sans-serif"; document.body.appendChild(newDiv); document.getElementById(`moreInfo`).innerHTML += `

Additional Options










` var scriptElem = document.createElement('script'); scriptElem.innerHTML = `function applied() { let skinName = document.getElementById('starterName').value; let skinImage = document.getElementById('starterSkin').value; let skinInfo = document.getElementById('starterInfo').value; localStorage.setItem('nameStorage', skinName); localStorage.setItem('imageStorage', skinImage); localStorage.setItem('infoStorage', skinInfo); }`; document.body.appendChild(scriptElem); document.getElementById('skinName').value = localStorage.getItem('nameStorage'); document.getElementById('skinImage').value = localStorage.getItem('imageStorage'); document.getElementById('otherInfo').value = localStorage.getItem('infoStorage'); document.getElementById('starterName').value = localStorage.getItem('nameStorage'); document.getElementById('starterSkin').value = localStorage.getItem('imageStorage'); document.getElementById('starterInfo').value = localStorage.getItem('infoStorage'); } GM_addStyle(`@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap'); body { background-color: #242424; } .jumbotron { background-color: #3b3b3b; color: white; font-family: 'Montserrat', sans-serif; } #skinsBg { background-color: #3b3b3b; }; legend { font-size:0px; } `) } })();