ux: use registrar-specific domain check links (cyberfolks pattern)
Some checks are pending
CI / lint (push) Waiting to run
Deploy / deploy (push) Waiting to run

This commit is contained in:
Adrian Miesikowski 2026-02-17 23:14:20 +01:00
parent 1ea8169fbd
commit 4a32b9b0fd

View File

@ -114,6 +114,18 @@ function best2y(regs, tld){
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(){
const q = document.getElementById('q').value.trim();
const tld = document.getElementById('tld').value;
@ -181,7 +193,7 @@ function renderRows(){
for(const d of domains.slice(0,300)){
const two = best2y(registrars,d.tld);
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>
<td>.${d.tld}</td>
<td>${d.score}</td>