refactor(index): remove unused search and comparison functionality for cleaner code
This commit is contained in:
parent
7aa14208a3
commit
8cc75b292b
1 changed files with 0 additions and 79 deletions
79
dist/index.html
vendored
79
dist/index.html
vendored
|
|
@ -2200,85 +2200,6 @@
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Remaining initialization code
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
// Search functionality for file hosts
|
|
||||||
const hostSearchInput = document.getElementById('host-search-input');
|
|
||||||
const clearHostSearch = document.getElementById('clear-host-search');
|
|
||||||
|
|
||||||
if (clearHostSearch) {
|
|
||||||
clearHostSearch.addEventListener('click', () => {
|
|
||||||
hostSearchInput.value = '';
|
|
||||||
hostSearchInput.focus();
|
|
||||||
// Trigger search clear event if needed
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search functionality for adult hosts
|
|
||||||
const adultHostSearchInput = document.getElementById('adult-host-search-input');
|
|
||||||
const clearAdultHostSearch = document.getElementById('clear-adult-host-search');
|
|
||||||
|
|
||||||
if (clearAdultHostSearch) {
|
|
||||||
clearAdultHostSearch.addEventListener('click', () => {
|
|
||||||
adultHostSearchInput.value = '';
|
|
||||||
adultHostSearchInput.focus();
|
|
||||||
// Trigger search clear event if needed
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mock data loading simulation (replace with actual API calls)
|
|
||||||
setTimeout(() => {
|
|
||||||
// Simulate loading completion
|
|
||||||
const loadingStates = document.querySelectorAll('.loading-state');
|
|
||||||
loadingStates.forEach(state => {
|
|
||||||
state.innerHTML = '<p style="text-align: center; color: var(--text-secondary); padding: var(--space-xl);">Data would be loaded here via API calls</p>';
|
|
||||||
});
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
// Compare functionality
|
|
||||||
const provider1Select = document.getElementById('provider1');
|
|
||||||
const provider2Select = document.getElementById('provider2');
|
|
||||||
const compareContainer = document.getElementById('compare-table-container');
|
|
||||||
|
|
||||||
if (provider1Select && provider2Select) {
|
|
||||||
// Populate select options (mock data)
|
|
||||||
const services = ['AllDebrid', 'Real-Debrid', 'TorBox', 'Premiumize', 'LinkSnappy', 'Debrid-Link', 'Mega-Debrid'];
|
|
||||||
|
|
||||||
services.forEach(service => {
|
|
||||||
const option1 = new Option(service, service.toLowerCase());
|
|
||||||
const option2 = new Option(service, service.toLowerCase());
|
|
||||||
provider1Select.appendChild(option1);
|
|
||||||
provider2Select.appendChild(option2);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Handle comparison
|
|
||||||
const updateComparison = () => {
|
|
||||||
const service1 = provider1Select.value;
|
|
||||||
const service2 = provider2Select.value;
|
|
||||||
|
|
||||||
if (service1 && service2 && service1 !== service2) {
|
|
||||||
compareContainer.style.display = 'block';
|
|
||||||
compareContainer.classList.add('comparison-visible');
|
|
||||||
compareContainer.innerHTML = `
|
|
||||||
<div style="padding: var(--space-4xl); text-align: center;">
|
|
||||||
<h3 style="margin: 0 0 var(--space-lg); color: var(--text-primary);">
|
|
||||||
${service1} vs ${service2}
|
|
||||||
</h3>
|
|
||||||
<p style="color: var(--text-secondary); margin: 0;">
|
|
||||||
Detailed comparison would be shown here
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
compareContainer.style.display = 'none';
|
|
||||||
compareContainer.classList.remove('comparison-visible');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
provider1Select.addEventListener('change', updateComparison);
|
|
||||||
provider2Select.addEventListener('change', updateComparison);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Noscript warning for core interactive features -->
|
<!-- Noscript warning for core interactive features -->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue