Skip to content

Instantly share code, notes, and snippets.

@glyv0x
Last active November 13, 2024 17:33
Show Gist options
  • Save glyv0x/9bb7d29ff3089e175aa3ff9cd642b4a6 to your computer and use it in GitHub Desktop.
Save glyv0x/9bb7d29ff3089e175aa3ff9cd642b4a6 to your computer and use it in GitHub Desktop.
Select multiple Magic Eden NFTs based on Inscription IDs/search terms. Intended for browser dev consoles
const searchAndSelectFirst = async () => {
const ids = [
"enter inscription IDs/search terms here, up to 30"
];
console.log(
"Click into the website to make it focused. Script starting in 5 seconds..."
);
await new Promise((resolve) => setTimeout(resolve, 5000));
for (const id of ids) {
const searchInput = document.querySelector("input.profile-search-input");
searchInput.click();
searchInput.focus();
await new Promise((resolve) => setTimeout(resolve, 500));
searchInput.value = "";
document.execCommand("insertText", false, id);
await new Promise((resolve) => setTimeout(resolve, 2000));
const plusButton = document.querySelector(
".tw-absolute.tw-flex.tw-items-center.tw-gap-x-2.tw-z-10.tw-top-2." +
"tw-right-2 button"
);
if (plusButton) plusButton.click();
await new Promise((resolve) => setTimeout(resolve, 1000));
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment