Initial commit: DNS Things - Comprehensive DNS utility website
Features implemented: - Modular JavaScript architecture (theme.js, dns-tools.js, whois.js, punycode.js, ip-tools.js, main.js) - Responsive design with dark/light theme toggle - DNS Lookup and Reverse DNS Lookup tools - Whois Lookup functionality - IDN Punycode Converter with full Unicode support - Comprehensive IP Address Tools (validation, IPv4-to-IPv6 mapping, IPv6 compression/expansion) - Dynamic tab descriptions that change based on active tool - Mobile-responsive horizontal scrollable tabs - Copy-to-clipboard functionality for all results - Clean footer with dynamic year - IPv4-mapped IPv6 address explanation with clear warnings Technical improvements: - Separated concerns with modular JS files - Fixed browser compatibility issues with punycode library - Implemented proper error handling and user feedback - Added comprehensive input validation - Optimized for mobile devices with touch-friendly UI
This commit is contained in:
33
assets/js/main.js
Normal file
33
assets/js/main.js
Normal file
@@ -0,0 +1,33 @@
|
||||
// DNS Things - Main Application Initialization
|
||||
|
||||
// Initialize everything when DOM is loaded
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Initialize core UI components
|
||||
initTheme();
|
||||
initTabs();
|
||||
initCopyButtons();
|
||||
|
||||
// Initialize DNS tools
|
||||
initIPDisplay();
|
||||
initDNSForm();
|
||||
initReverseDNSForm();
|
||||
|
||||
// Initialize additional tools
|
||||
initWhoisForm();
|
||||
initPunycodeConverter();
|
||||
initIPTools();
|
||||
|
||||
// Set dynamic year in footer
|
||||
initFooter();
|
||||
|
||||
console.log('DNS Things application initialized successfully');
|
||||
});
|
||||
|
||||
// Initialize footer with dynamic year
|
||||
function initFooter() {
|
||||
const yearElement = document.getElementById('current-year');
|
||||
if (yearElement) {
|
||||
const currentYear = new Date().getFullYear();
|
||||
yearElement.textContent = currentYear;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user