async function fetchTools() { try { const response = await fetch('tools.json'); if (!response.ok) { throw new Error("VPS response is bad"); } const tools = await response.json(); return tools; } catch (error) { console.error("Failed to fetch tools:", error); return []; } }; function renderTools(filteredTools, language = 'en') { const toolList = document.getElementById('toolsMain'); toolList.innerHTML = ""; filteredTools.forEach(tool => { const toolData = { name: language === 'de' ? tool["name-de"] : tool.name, subheader: language === 'de' ? tool["subheader-de"] : tool.subheader, description: language === 'de' ? tool["description-de"] : tool.description, url: tool.url }; const toolItem = document.createElement("div"); toolItem.className = "tool-div"; toolItem.innerHTML = `