Created
February 20, 2017 06:15
-
-
Save seanlane/0a1a6e1b94bf7b1aa5d463983dfbe2af to your computer and use it in GitHub Desktop.
Filter Domcomp.com results based on length, registration, and other factors
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
// Filter domcomp.com results to show what I'm interested in | |
function clr() { | |
// Google Global TLDs as of Jan 2017 | |
var g_tlds = ['ad', 'as', 'bz', 'cc', 'cd', 'co', 'dj', 'fm', 'io', | |
'la', 'me', 'ms', 'nu', 'sc', 'sr', 'su', 'tv', 'tk', 'ws'] | |
var rows = document.getElementsByClassName('price_table')[0].rows; | |
var re = /^[a-z0-9]+$/i; | |
for (var i = 1; i < rows.length; i++) { | |
if (rows[i].classList.contains('registered') || // Don't show registered TLDs | |
rows[i].attributes['tld'].value.length > 2 || // Don't show TLDs logner than 2 chars | |
// $.inArray(rows[i].attributes['tld'].value, g_tlds) == -1 // Only show Google Global TLDs | |
re.exec(rows[i].attributes['tld'].value) == null) // Don't TLDs with non-English chars | |
{ | |
rows[i].style.display = 'None'; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment