function applyAllChanges() {
    removeBanners();
    replaceTextOnPage();
    replaceTitle();
    replaceLogo();
    replaceSpecialImage();
    replaceHeaderLogo();
    replaceFavicon();
    replaceStartScreenLogos();
    overrideCSS();
    applyRobotReplacement();
    createUI();
}

window.applyAllChanges = applyAllChanges;

if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', applyAllChanges);
} else {
    applyAllChanges();
}

const observer = new MutationObserver(() => {
    applyAllChanges();
});
observer.observe(document.body, { childList: true, subtree: true });

if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', () => {
        if (window.initPsychedelic) window.initPsychedelic();
        if (window.initIshakify) window.initIshakify();
        if (window.initAutocomplete) window.initAutocomplete();
        if (window.initHighlight) window.initHighlight();
        if (window.initTheme) window.initTheme();
        if (window.initBackground) window.initBackground();
        if (window.initTransparency) window.initTransparency();
        if (window.initNotifications) window.initNotifications(); // добавить
    });
} else {
    if (window.initPsychedelic) window.initPsychedelic();
    if (window.initIshakify) window.initIshakify();
    if (window.initAutocomplete) window.initAutocomplete();
    if (window.initHighlight) window.initHighlight();
    if (window.initTheme) window.initTheme();
    if (window.initBackground) window.initBackground();
    if (window.initTransparency) window.initTransparency();
    if (window.initNotifications) window.initNotifications(); // добавить
}