function loadRouteFromUrl() {
    const params = new URLSearchParams(window.location.search);
    const taskId = params.get('task');
    const versionId = params.get('version');
    const projectId = params.get('project');
    const projectTasks = params.get('tasks');
    const profile = params.get('profile');
    const adminSection = params.get('admin');

    closePopups();

    if (adminSection) {
        loadAdmin(adminSection, false);
        return;
    }

    if (profile) {
        loadProfile(false);
        return;
    }

    if (taskId) {
        loadTask(taskId, false);
        return;
    }

    if (versionId) {
        loadVersion(versionId, false);
        return;
    }

    if (projectId) {
        if (projectTasks) {
            loadProjectTasks(projectId, 1, false);
        } else {
            loadProject(projectId, false);
        }
        return;
    }

    loadDashboard(false);
}
