update images and tag line
This commit is contained in:
+48
-13
@@ -4,10 +4,13 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>E-Dir</title>
|
||||
<meta name="description" content="Dhiraagu Directory Lookup - Search any phone number instantly">
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
<meta name="description" content="Dhiraagu Directory Lookup - Search without Recaptcha annoyance">
|
||||
<meta property="og:title" content="E-Dir">
|
||||
<meta property="og:description" content="Dhiraagu Directory Lookup - Search any phone number instantly">
|
||||
<meta property="og:image" content="og-image.svg">
|
||||
<meta property="og:description" content="Dhiraagu Directory Lookup - Search without Recaptcha annoyance">
|
||||
<meta property="og:image" content="og-image.png">
|
||||
<meta property="og:type" content="website">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
|
||||
@@ -284,6 +287,27 @@
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.searched-number {
|
||||
font-size: 14px;
|
||||
color: var(--orange);
|
||||
font-weight: 500;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.searched-number .material-icons {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.result-card + .result-card,
|
||||
.result-card + .error-message,
|
||||
.error-message + .result-card,
|
||||
.error-message + .error-message {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -337,7 +361,6 @@
|
||||
// Show loading state
|
||||
searchBtn.disabled = true;
|
||||
searchBtn.innerHTML = '<div class="spinner"></div><span>Searching...</span>';
|
||||
resultsDiv.classList.remove('show');
|
||||
|
||||
try {
|
||||
const response = await fetch(`https://dhiraagu-edir-proxy.shihaam.me/${encodeURIComponent(phoneNumber)}`);
|
||||
@@ -345,24 +368,29 @@
|
||||
|
||||
if (response.ok && data && data.dirEnquiryEntry) {
|
||||
if (data.dirEnquiryEntry === 'Number not found') {
|
||||
displayError('Number not found');
|
||||
displayError(phoneNumber, 'Number not found');
|
||||
} else {
|
||||
displayResult(data.dirEnquiryEntry);
|
||||
displayResult(phoneNumber, data.dirEnquiryEntry);
|
||||
}
|
||||
} else {
|
||||
displayError('No results found');
|
||||
displayError(phoneNumber, 'No results found');
|
||||
}
|
||||
} catch (error) {
|
||||
displayError('Failed to fetch data. Please try again.');
|
||||
displayError(phoneNumber, 'Failed to fetch data. Please try again.');
|
||||
} finally {
|
||||
searchBtn.disabled = false;
|
||||
searchBtn.innerHTML = '<span class="material-icons">search</span><span>Search</span>';
|
||||
phoneInput.value = '';
|
||||
}
|
||||
});
|
||||
|
||||
function displayResult(entry) {
|
||||
function displayResult(searchedNumber, entry) {
|
||||
const html = `
|
||||
<div class="result-card">
|
||||
<div class="searched-number">
|
||||
<span class="material-icons">phone</span>
|
||||
<span>${escapeHtml(searchedNumber)}</span>
|
||||
</div>
|
||||
<div class="result-item">
|
||||
<span class="material-icons">person</span>
|
||||
<div>
|
||||
@@ -372,17 +400,24 @@
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
resultsDiv.innerHTML = html;
|
||||
resultsDiv.insertAdjacentHTML('afterbegin', html);
|
||||
resultsDiv.classList.add('show');
|
||||
}
|
||||
|
||||
function displayError(message) {
|
||||
resultsDiv.innerHTML = `
|
||||
function displayError(searchedNumber, message) {
|
||||
const html = `
|
||||
<div class="error-message">
|
||||
<span class="material-icons">error</span>
|
||||
<span>${escapeHtml(message)}</span>
|
||||
<div>
|
||||
<div class="searched-number" style="color: #f44336; margin-bottom: 4px;">
|
||||
<span class="material-icons">phone</span>
|
||||
<span>${escapeHtml(searchedNumber)}</span>
|
||||
</div>
|
||||
<span>${escapeHtml(message)}</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
resultsDiv.insertAdjacentHTML('afterbegin', html);
|
||||
resultsDiv.classList.add('show');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user