Created
March 8, 2024 18:49
-
-
Save devjmetivier/3de4d9d80ea86e31a9094c8d8384f633 to your computer and use it in GitHub Desktop.
Vercel Domains filter by TLD length
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
const domains = document.querySelectorAll('[data-testid="domains/search-item"]'); | |
const tldLength = 2; // edit this value to filter by length greater than the value | |
domains.forEach((domain) => { | |
if (domain.querySelector(".tld-part").textContent.length > tldLength) { | |
const listItem = | |
domain.querySelector(".tld-part").parentElement.parentElement | |
.parentElement; | |
const list = | |
domain.querySelector(".tld-part").parentElement.parentElement | |
.parentElement.parentElement; | |
list.removeChild(listItem); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment