'';
    const normalizePath = (endpoint) => {
        const pathname = location.pathname;
        return pathname.endsWith('/') ? `${pathname}${endpoint}` : `${pathname}/${endpoint}`;
    };
    refreshInbox();
    setInterval(refreshInbox, 5000);

    const typeSelect = document.querySelector('#type-selector');
    fetch(normalizePath('types'))
        .then((res) => res.json())
        .then((res) => {
            res.forEach((type) => {
                const option = document.createElement('option');
   