Skip to content

Instantly share code, notes, and snippets.

@uncenter
Last active September 24, 2023 02:23
Show Gist options
  • Save uncenter/ab1ec276e0546cba7b1955f81670b219 to your computer and use it in GitHub Desktop.
Save uncenter/ab1ec276e0546cba7b1955f81670b219 to your computer and use it in GitHub Desktop.
Find your (or any) name in the Arc Browser's Credits (https://arc.net/credits).
const name = prompt("Enter the name to search for:");
const credits = document.querySelector('.c-bMkhAk');
if (credits) {
const elements = credits.childNodes;
let count = 0;
let target= null;
for (let i = 0; i < elements.length; i++) {
const current = elements[i];
if (current.nodeType === Node.ELEMENT_NODE && current.textContent.toLowerCase() === name.toLowerCase()) {
target = current;
break;
}
count++;
}
if (target) {
console.log("Found it!", target);
console.log(`That name, '${name}', was #${count} in the credits.`);
} else {
console.log("Element with name '" + name + "' not found in credits.");
}
} else {
console.log("Credits not found!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment