Last active
December 3, 2025 01:23
-
-
Save ZenithRogue/d49c47d37223bc707267ad4f139f99f3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // ==UserScript== | |
| // @name Base64 from Head Command Inject | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2025-12-03 | |
| // @description try to take over the world! | |
| // @author ZenithKnight | |
| // @match https://namemc.com/skin/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=namemc.com | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| // Your code here... | |
| function waitForElement(selector, callback) { | |
| const el = document.querySelector(selector); | |
| if (el) { | |
| callback(el); | |
| } else { | |
| requestAnimationFrame(() => waitForElement(selector, callback)); | |
| } | |
| } | |
| async function setClipboard(text) { | |
| const type = "text/plain"; | |
| const clipboardItemData = { | |
| [type]: text, | |
| }; | |
| const clipboardItem = new ClipboardItem(clipboardItemData); | |
| await navigator.clipboard.write([clipboardItem]); | |
| } | |
| waitForElement('.head-command', (target) => { | |
| const newElem = document.createElement('div'); | |
| let input = document.querySelector('input.head-command').value; | |
| let b64 = input.match(/(?:^|\")(e[A-z0-9+=]{1,})/)[1]; | |
| let url = atob(b64).match(/(https?:\/\/textures\.minecraft\.net\/texture\/[A-z0-9]*)/)[1]; | |
| newElem.innerHTML = `<div class="card mb-3"> | |
| <div class="card-header py-1">Base64 for Mannequin Profiles</div> | |
| <div class="card-body px-2 py-0"> | |
| <div class="input-group input-group-sm my-2"> | |
| <input id="b64" class="head-command form-control" style="font-family: 'Cascadia Mono', Consolas, monospace" value="${b64}" readonly=""/> | |
| <button class="btn btn-outline-secondary copy-button rounded-end" type="button" href="javascript:void(0)">Copy</button> | |
| </div> | |
| </div> | |
| </div>`; | |
| newElem.addEventListener("click", (event) => { | |
| setClipboard(b64); | |
| }) | |
| Array.from(document.getElementsByClassName("card mb-3")).pop().insertAdjacentElement('afterend', newElem); | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment