Skip to content

Instantly share code, notes, and snippets.

@Mintonne
Created February 1, 2025 21:32
Show Gist options
  • Save Mintonne/8b70a96b40469f56ddf19269b8b80dac to your computer and use it in GitHub Desktop.
Save Mintonne/8b70a96b40469f56ddf19269b8b80dac to your computer and use it in GitHub Desktop.
Remove .org on Lean Domain Search
document.querySelectorAll('div').forEach(div => {
// Find the .com button inside the div using the specific class
const comButton = Array.from(div.querySelectorAll('button.D3bn80gpjJYbThlrC75D')).find(button => button.textContent.trim() === '.com');
// If the button exists and is NOT disabled, remove the parent div and log the details
if (comButton && comButton.disabled) {
if (div.classList.contains('udApQ0SPEGKgZUVAry6t')) {
console.log(`Removing parent div with class 'udApQ0SPEGKgZUVAry6t' containing enabled '.com' button. Div content: "${div.innerHTML.trim()}"`);
// Remove the parent div
div.remove();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment