<span id="siteSettingsButton" onclick="toggleMenu()"></span>
<div id="siteSettings" class="borderStyle" style="display: none;">
    <div id="editor" class="siteSettingsOption" onclick="basisVis()">{{editor_page}}</div>
    <div id="manager" class="siteSettingsOption" onclick="basisVisManager()">{{file_manager}}</div>
    <div id="siteTree" class="siteSettingsOption" onclick="basisVisSiteTree()">{{site_tree}}</div>
</div>

<script>
window.addEventListener("load", function() {
    try {
        var siteSettingsButton = document.getElementById("siteSettingsButton").outerHTML;
        var siteSettings = document.getElementById("siteSettings").outerHTML;

        document.getElementById("siteSettingsButton").remove();
        document.getElementById("siteSettings").remove();

        var container = document.getElementById("hbody");
        if (!container) throw new Error("#hbody не найден для siteSettings");
        container.insertAdjacentHTML("beforeend", siteSettingsButton);
        container.insertAdjacentHTML("beforeend", siteSettings);
    } catch (e) {
        console.error("Ошибка в блоке siteSettings:", e);
    }
});
</script>