document.addEventListener(‘DOMContentLoaded’, function() {
const removeSofiaOblast = () => {
document.querySelectorAll(‘select[name$=“_state“]’).forEach(select => {
const options = select.querySelectorAll(‘option’);
options.forEach(opt => {
const txt = opt.textContent.trim().toLowerCase();
if (txt === ‘софия област’ || txt === ‘област софия’) {
opt.remove();
}
});
});
};
// Стартира веднага след зареждане
setTimeout(removeSofiaOblast, 1500);
// Следи промените в DOM (при зареждане на държави или методи за доставка)
const observer = new MutationObserver(() => removeSofiaOblast());
observer.observe(document.body, { childList: true, subtree: true });
});

