'); d.close(); })();

Loading domain info…

' + 'Buy Now' + ''; } const marketplaceCards = [ mpCard('Namecheap', ncPrice, ncUrl, 'noopener sponsored nofollow', true), mpCard('GoDaddy', gdPrice, gdUrl, 'noopener', false), mpCard('Sedo', sedoPrice, sedoUrl, 'noopener', false), afPrice && !gdPrice ? mpCard('GoDaddy', afPrice, gdUrl, 'noopener', false) : '', mpCard('Afternic', afPrice, afUrl, 'noopener', false), ].join(''); // Smart inventory filter config const smartMode = (ncPrice && ncPrice c.toLowerCase())); // Features list const featureItems = features.length ? features.map(f => '

  • ' + esc(f) + '
  • ').join('') : '

  • Brandable & memorable .com
  • '; const html = `

    ${esc(data.domain_styled || data.domain)} for sale

    VERIFIED DOMAIN ${data.available ? 'Available' : ''} ${showViews ? '' + views.toLocaleString() + ' views/mo · GA 🔥' : ''}
    $${displayPrice ? displayPrice.toLocaleString() : '—'} ${showAppraisal ? '$' + Number(data.estimated_value).toLocaleString() + 'GoDaddy Appraisal' : ''}
    ${ncPrice ? 'Buy Now on Namecheap' : ''}

    🔒 You pay directly on Namecheap, GoDaddy, or Sedo — DNLoft never handles your payment or personal information.

    ${marketplaceCards}

    Prices vary by platform — each marketplace sets its own fees. You're always getting the best available price on Namecheap.

    ${ncEligible ? '
    ⚡Instant access when buying on Namecheap. Even though this domain is less than 60 days old, since it\u2019s already registered at Namecheap, you can take ownership immediately via internal account push \u2014 no waiting for the ICANN transfer lock to expire.
    ' : ''}

    Specifications

    ${showAppraisal ? '' : ''}
    Domain${esc(data.domain_styled || data.domain)}
    Created${data.creation_date || '—'}
    Age${ageLabel}
    Length${data.length || '—'}
    Categories${(data.categories || []).join(', ') || '—'}
    Availability${data.available ? 'Available' : 'Unavailable'}
    GoDaddy Appraisal$' + Number(data.estimated_value).toLocaleString() + '

    WHOIS & internal SEO metric snapshot.

    Authority & Link Metrics

    DA${data.moz_da != null ? data.moz_da : '—'}
    PA${data.moz_pa != null ? data.moz_pa : '—'}
    Ref Domains${data.moz_linking_domains != null ? data.moz_linking_domains : '—'}
    Total Links${data.moz_total_links != null ? data.moz_total_links : '—'}
    ${showViews ? '
    Views/mo GA' + views.toLocaleString() + '
    ' : ''}

    Metrics via MOZ snapshot; not continuously updating.

    Why It's Great

      ${featureItems}
    ${externalLinksHtml}

    ${smartMode === 'affordable' ? 'More affordable domains' : 'Similar domains you may like'}

    ${smartMode === 'affordable' ? 'Other domains priced under $100.' : 'Domains in the same category.'}

    Filter domains
    –
    –
    –
    –
    Domain Created Age Len Avail Price DA PA Linking
    Domains
    Total
    Links
    Loading…
    `; const container = document.getElementById('page-content'); container.innerHTML = html; container.style.display = ''; document.getElementById('loading-state').style.display = 'none'; // Copy button const copyBtn = document.getElementById('copyDomainBtn'); if (copyBtn) { copyBtn.addEventListener('click', function () { navigator.clipboard.writeText(copyBtn.dataset.domain).then(function () { copyBtn.textContent = 'Copied'; copyBtn.classList.add('ok'); setTimeout(function () { copyBtn.textContent = 'Copy'; copyBtn.classList.remove('ok'); }, 1500); }); }); } // Inventory table initInventory(allDomains, data.domain, smartMode, (data.categories || []).map(c => c.toLowerCase())); } function setMeta(name, content, isOg) { const sel = isOg ? 'meta[property="' + name + '"]' : 'meta[name="' + name + '"]'; let el = document.querySelector(sel); if (!el) { el = document.createElement('meta'); el[isOg ? 'property' : 'name'] = name; document.head.appendChild(el); } el.content = content; } /* ── Inventory table ──────────────────────────────────────────── */ function initInventory(allDomains, currentDomain, smartMode, smartCats) { let data = allDomains.slice(); let filtered = []; let page = 1; let sortKey = 'price'; let sortDir = 'asc'; let searchDebounce; const tbody = document.getElementById('inventoryBody'); const pager = document.getElementById('invPager'); const pagerList = document.getElementById('pagerList'); const headRow = document.getElementById('invHeadRow'); const fSearch = document.getElementById('fSearch'); const fTld = document.getElementById('fTld'); const fDaMin = document.getElementById('fDaMin'); const fDaMax = document.getElementById('fDaMax'); const fAgeMin = document.getElementById('fAgeMin'); const fAgeMax = document.getElementById('fAgeMax'); const fLenMin = document.getElementById('fLenMin'); const fLenMax = document.getElementById('fLenMax'); const fPriceMin = document.getElementById('fPriceMin'); const fPriceMax = document.getElementById('fPriceMax'); const fReset = document.getElementById('fReset'); const filterStatus = document.getElementById('filterStatus'); const filterForm = document.getElementById('filterForm'); const tableRegion = document.querySelector('.inventory-table-wrapper'); function getSmartBase() { const cur = currentDomain.toLowerCase(); if (smartMode === 'affordable') { return data.filter(d => (d.domain || '').toLowerCase() !== cur && (function () { const p = namecheapPrice(d.marketplaces); return p != null && p (d.domain || '').toLowerCase() !== cur && Array.isArray(d.categories) && d.categories.some(c => cats.has(String(c).toLowerCase()))); } function matchesSearch(d) { const toks = (fSearch ? fSearch.value : '').toLowerCase().trim().split(/\s+/).filter(Boolean); if (!toks.length) return true; const hay = ((d.domain_styled || d.domain || '') + ' ' + (d.slug || '')).toLowerCase(); return toks.every(t => hay.includes(t)); } function applyFilters() { const tldSel = (fTld ? fTld.value : '').toLowerCase(); const daMin = parseInt(fDaMin ? fDaMin.value : '', 10); const daMax = parseInt(fDaMax ? fDaMax.value : '', 10); const ageMin = parseInt(fAgeMin ? fAgeMin.value : '', 10); const ageMax = parseInt(fAgeMax ? fAgeMax.value : '', 10); const lenMin = parseInt(fLenMin ? fLenMin.value : '', 10); const lenMax = parseInt(fLenMax ? fLenMax.value : '', 10); const priceMin = parseFloat(fPriceMin ? fPriceMin.value : ''); const priceMax = parseFloat(fPriceMax ? fPriceMax.value : ''); filtered = getSmartBase().filter(d => { if (!matchesSearch(d)) return false; if (tldSel) { const t = (d.domain || '').toLowerCase().split('.').pop(); if (t !== tldSel) return false; } if (!isNaN(daMin) && (d.moz_da == null || d.moz_da daMax)) return false; const age = computeAge(d.creation_date); if (!isNaN(ageMin) && (age == null || age ageMax)) return false; const len = d.length != null ? Number(d.length) : null; if (!isNaN(lenMin) && (len == null || len lenMax)) return false; const price = namecheapPrice(d.marketplaces); if (!isNaN(priceMin) && (price == null || price priceMax)) return false; return true; }); page = 1; render(); if (tableRegion) tableRegion.focus(); } function sortData() { filtered.sort(function (a, b) { let av, bv; switch (sortKey) { case 'domain': av = (a.domain || '').toLowerCase(); bv = (b.domain || '').toLowerCase(); break; case 'created': av = new Date(a.creation_date || 0).getTime(); bv = new Date(b.creation_date || 0).getTime(); break; case 'age': av = computeAge(a.creation_date) || -1; bv = computeAge(b.creation_date) || -1; break; case 'len': av = a.length != null ? a.length : Infinity; bv = b.length != null ? b.length : Infinity; break; case 'avail': av = a.available ? 1 : 0; bv = b.available ? 1 : 0; break; case 'price': av = namecheapPrice(a.marketplaces); bv = namecheapPrice(b.marketplaces); if (av == null) av = Infinity; if (bv == null) bv = Infinity; break; case 'da': av = a.moz_da != null ? a.moz_da : -1; bv = b.moz_da != null ? b.moz_da : -1; break; case 'pa': av = a.moz_pa != null ? a.moz_pa : -1; bv = b.moz_pa != null ? b.moz_pa : -1; break; case 'ld': av = a.moz_linking_domains != null ? a.moz_linking_domains : -1; bv = b.moz_linking_domains != null ? b.moz_linking_domains : -1; break; case 'tl': av = a.moz_total_links != null ? a.moz_total_links : -1; bv = b.moz_total_links != null ? b.moz_total_links : -1; break; default: return 0; } if (av bv) return sortDir === 'asc' ? 1 : -1; return 0; }); } function render() { sortData(); const start = (page - 1) * PAGE_SIZE; const slice = filtered.slice(start, start + PAGE_SIZE); if (!slice.length) { tbody.innerHTML = '

    No domains.

    '; pager.hidden = true; announce(); return; } tbody.innerHTML = slice.map(function (d) { const avail = d.available ? 'Yes' : 'No'; const url = 'https://dnloft.com/domain/' + esc(d.slug) + '/'; const age = computeAge(d.creation_date); return '

    ' + '' + esc(d.domain_styled || d.domain) + '' + '' + fmtDate(d.creation_date) + '' + '' + (age != null ? age : '–') + '' + '' + (d.length != null ? d.length : '–') + '' + '' + avail + '' + '' + buildPriceCell(d.marketplaces) + '' + '' + (d.moz_da != null ? d.moz_da : '–') + '' + '' + (d.moz_pa != null ? d.moz_pa : '–') + '' + '' + (d.moz_linking_domains != null ? d.moz_linking_domains : '–') + '' + '' + (d.moz_total_links != null ? d.moz_total_links : '–') + '' + '

    '; }).join(''); buildPager(); updateSortIndicators(); announce(); } function buildPager() { const totalPages = Math.ceil(filtered.length / PAGE_SIZE); if (totalPages 1) { const t = parts.pop().toLowerCase(); if (t) set.add(t); } }); Array.from(set).sort().forEach(function (t) { const opt = document.createElement('option'); opt.value = t; opt.textContent = '.' + t; fTld.appendChild(opt); }); } headRow.addEventListener('click', function (e) { const th = e.target.closest('th[data-sort]'); if (!th) return; const key = th.getAttribute('data-sort'); if (sortKey === key) { sortDir = sortDir === 'asc' ? 'desc' : 'asc'; } else { sortKey = key; sortDir = 'asc'; } page = 1; render(); if (tableRegion) tableRegion.focus(); }); if (filterForm) filterForm.addEventListener('submit', function (e) { e.preventDefault(); applyFilters(); }); if (fReset) fReset.addEventListener('click', function () { [fTld, fDaMin, fDaMax, fAgeMin, fAgeMax, fLenMin, fLenMax, fPriceMin, fPriceMax, fSearch].forEach(function (el) { if (el) el.value = ''; }); applyFilters(); }); if (fSearch) { fSearch.addEventListener('input', function () { clearTimeout(searchDebounce); searchDebounce = setTimeout(applyFilters, 250); }); fSearch.addEventListener('search', applyFilters); } populateTlds(); filtered = getSmartBase(); render(); } /* ── Main: fetch domains.json and boot ───────────────────────── */ async function main() { const host = window.location.hostname.toLowerCase(); try { const res = await fetch(DOMAINS_JSON_URL); if (!res.ok) throw new Error('HTTP ' + res.status); const domains = await res.json(); const data = domains.find(function (d) { return (d.domain || '').toLowerCase() === host; }); if (!data) { document.getElementById('loading-state').style.display = 'none'; document.getElementById('error-state').style.display = ''; return; } renderPage(data, domains); } catch (err) { document.getElementById('loading-state').innerHTML = '

    Failed to load domain data.

    '; const retryBtn = document.getElementById('retryBtn'); if (retryBtn) retryBtn.addEventListener('click', main); } } /* ── Theme toggle ─────────────────────────────────────────────── */ (function () { var root = document.documentElement; function applyTheme(theme) { root.setAttribute('data-theme', theme); localStorage.setItem('theme', theme); var icon = document.querySelector('#themeToggle span'); if (icon) icon.className = theme === 'dark' ? 'icon-moon' : 'icon-sun'; var btn = document.getElementById('themeToggle'); if (btn) btn.setAttribute('aria-label', theme === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'); } applyTheme(root.getAttribute('data-theme') || 'dark'); var btn = document.getElementById('themeToggle'); if (btn) btn.addEventListener('click', function () { applyTheme(root.getAttribute('data-theme') === 'dark' ? 'light' : 'dark'); }); })(); main(); })();