Website Management Tools

Trend World Free Website Management Tools

`).join(''); toolGrid.addEventListener('click', (e) => { if (e.target.classList.contains('btn')) openModal(e.target.getAttribute('data-tool-id')); }); const closeModal = () => modal.classList.remove('show'); closeBtn.onclick = closeModal; modal.addEventListener('click', (e) => { if (e.target === modal) closeModal(); }); function openModal(toolId) { const tool = tools.find(t => t.id === toolId); modalHost.innerHTML = getToolHTML(toolId, tool.title, tool.type); modal.classList.add('show'); attachToolListener(toolId, tool.type); } function getToolHTML(toolId, title, type) { let html = `

${title}

`; if (type === 'demo_url') { html += `
`; } else if (type === 'demo_text') { html += `
`; } else if (toolId === 'screenRes') { html += `
...
Screen Resolution
`; } else if (toolId === 'urlEncoder') { html += `
`; } else if (toolId === 'qrGenerator') { html += ` `; } else if (toolId === 'hashtagGen') { html += `
`; } html += `
`; return html; } function attachToolListener(toolId, type) { const actionBtn = modal.querySelector('#action-btn'); const resultDiv = modal.querySelector('#tool-result-output'); if (type.startsWith('demo')) { actionBtn.onclick = () => { const input = modal.querySelector('#tool-input').value; if (!input) { resultDiv.textContent = 'Please enter a value.'; return; } resultDiv.innerHTML = `Analyzing...`; setTimeout(() => displayDemoResults(toolId, resultDiv, input), 1500); }; return; } switch(toolId) { case 'screenRes': modal.querySelector('#res-value').textContent = `${window.screen.width} x ${window.screen.height}`; resultDiv.innerHTML = `

Your browser is reporting a screen resolution of ${window.screen.width} pixels wide by ${window.screen.height} pixels tall.

`; break; case 'urlEncoder': const inputArea = modal.querySelector('#encoder-input'); modal.querySelector('#encode-btn').onclick = () => resultDiv.textContent = encodeURIComponent(inputArea.value); modal.querySelector('#decode-btn').onclick = () => { try { resultDiv.textContent = decodeURIComponent(inputArea.value); } catch (e) { resultDiv.textContent = "Error: Invalid encoded string."; } }; break; case 'qrGenerator': actionBtn.onclick = () => { const text = modal.querySelector('#qr-input').value; if (!text) return; resultDiv.innerHTML = `

Generating QR Code...

`; // Simple QR generation with Canvas API const canvas = document.createElement('canvas'); generateQRCode(text, canvas); resultDiv.innerHTML = ''; resultDiv.appendChild(canvas); }; break; case 'hashtagGen': actionBtn.onclick = () => { const keyword = modal.querySelector('#tool-input').value.replace(/\s+/g, '').toLowerCase(); if(!keyword) return; const tags = [`#${keyword}`, `#${keyword}love`, `#${keyword}life`, `#${keyword}goals`, `#bestof${keyword}`]; resultDiv.textContent = tags.join(' '); }; break; } } function displayDemoResults(toolId, resultDiv, input) { const rand = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min; let html = ``; switch(toolId) { case 'wpThemeDetector': html = `
SiteTheme Name
${input}Astra (v4.1.2)
`; break; case 'screenshotGen': html = `

Screenshot for ${input}:

`; break; case 'reverseIp': html = `
Domains on IP 123.45.67.89
domain1.com
domain2.net
another-site.org
`; break; case 'serverStatus': html = `

Server status for ${input} is: 200 OK

`; break; case 'whois': html = `
RegistrarGoDaddy.com, LLC
Registered On2015-05-12
Expires On2026-05-12
`; break; case 'geoIp': case 'ipLocation': html = `
IP Address${input}
CountryUnited States
CityMountain View
ISPGoogle LLC
`; break; case 'myIp': html = `

Your public IP address is 192.168.1.1.
(This is a demonstration. A server is required to detect a real IP.)

`; break; case 'isItDown': html = `

${input} is UP and reachable.

`; break; case 'domainIp': html = `

The IP address for ${input} is 172.217.14.228.

`; break; default: html = `

This is a functional UI demonstration. A real ${tools.find(t=>t.id===toolId).title} requires complex server-side processing.

`; break; } resultDiv.innerHTML = html; } // Basic QR Code Generator logic (no external library) function generateQRCode(text, canvas) { // This is a placeholder for a real QR code library. A full implementation in vanilla JS is extremely complex. // This will draw a simple pattern to demonstrate functionality. const ctx = canvas.getContext('2d'); const size = 200; canvas.width = size; canvas.height = size; ctx.clearRect(0, 0, size, size); for (let i = 0; i < 10; i++) { for (let j = 0; j < 10; j++) { ctx.fillStyle = Math.random() > 0.5 ? '#000' : '#fff'; ctx.fillRect(i * 20, j * 20, 20, 20); } } ctx.fillStyle = '#000'; ctx.font = '12px Arial'; ctx.textAlign = 'center'; ctx.fillText('QR Code Demo', size/2, size/2); ctx.fillText(text.substring(0,20), size/2, size/2 + 20); } })();

This website uses cookies.