ux: use registrar-specific domain check links (cyberfolks pattern)
This commit is contained in:
parent
1ea8169fbd
commit
4a32b9b0fd
14
index.html
14
index.html
@ -114,6 +114,18 @@ function best2y(regs, tld){
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function domainCheckUrl(registrarName, fallbackUrl, domain){
|
||||||
|
const d = encodeURIComponent(domain);
|
||||||
|
const n = (registrarName || '').toLowerCase();
|
||||||
|
if(n.includes('cyber')) return `https://cyberfolks.pl/domeny-rejestracja/?slowa=${d}`;
|
||||||
|
if(n.includes('home.pl')) return `https://home.pl/szukaj/?query=${d}`;
|
||||||
|
if(n.includes('nazwa')) return `https://www.nazwa.pl/sprawdz-domene/?domain=${d}`;
|
||||||
|
if(n.includes('ovh')) return `https://www.ovhcloud.com/pl/domains/?domain=${d}`;
|
||||||
|
if(n.includes('aftermarket')) return `https://aftermarket.pl/szukaj/${d}`;
|
||||||
|
if(n.includes('porkbun')) return `https://porkbun.com/checkout/search?q=${d}`;
|
||||||
|
return fallbackUrl || `https://www.whois.com/whois/${d}`;
|
||||||
|
}
|
||||||
|
|
||||||
async function loadDomains(){
|
async function loadDomains(){
|
||||||
const q = document.getElementById('q').value.trim();
|
const q = document.getElementById('q').value.trim();
|
||||||
const tld = document.getElementById('tld').value;
|
const tld = document.getElementById('tld').value;
|
||||||
@ -181,7 +193,7 @@ function renderRows(){
|
|||||||
for(const d of domains.slice(0,300)){
|
for(const d of domains.slice(0,300)){
|
||||||
const two = best2y(registrars,d.tld);
|
const two = best2y(registrars,d.tld);
|
||||||
const tr = document.createElement('tr');
|
const tr = document.createElement('tr');
|
||||||
const checkUrl = two?.url ? `${two.url}` : `https://www.whois.com/whois/${d.domain}`;
|
const checkUrl = domainCheckUrl(two?.name, two?.url, d.domain);
|
||||||
tr.innerHTML = `<td><a href='${checkUrl}' target='_blank'><b>${d.domain}</b></a> ${d.is_new ? `<span class='chip'>NEW</span>` : ''}</td>
|
tr.innerHTML = `<td><a href='${checkUrl}' target='_blank'><b>${d.domain}</b></a> ${d.is_new ? `<span class='chip'>NEW</span>` : ''}</td>
|
||||||
<td>.${d.tld}</td>
|
<td>.${d.tld}</td>
|
||||||
<td>${d.score}</td>
|
<td>${d.score}</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user