Here’s Why Miale Real Estates Limited Should Be Your Trusted Partner: Kenya’s real estate landscape has evolved drastically over the past two decades, turning land into…
The real estate landscape in Kenya continues to evolve at a remarkable pace, once concentrated in Nairobi's central neighborhoods, property investment continues to spread widely. It…
In Kenya, land ownership is a vital consideration for investors, developers, and individuals alike. The legal framework governing land in the country recognizes two principal forms…
Have a question or need assistance? Send us a quick message and our team will respond promptly
(function() {
function replaceCurrencyInElement(el) {
// Walk text nodes inside the element and transform only leading $ or USD
const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, null, false);
let node;
while (node = walker.nextNode()) {
// Skip empty nodes
if (!node.nodeValue.trim()) continue;
// Replace only at start of the text node: $, $ (with space), USD, USD (with space)
const newVal = node.nodeValue.replace(/^\s*(\$|USD)\s*/i, 'KES ');
if (newVal !== node.nodeValue) node.nodeValue = newVal;
}
}
function scanAndReplace() {
document.querySelectorAll('.has-ele-price').forEach(el => replaceCurrencyInElement(el));
}
// Initial run
scanAndReplace();
// Observe DOM changes (Elementor may inject later)
const obs = new MutationObserver(mutations => {
let touched = false;
for (const m of mutations) {
if (m.addedNodes && m.addedNodes.length) {
touched = true; break;
}
if (m.type === 'characterData') { touched = true; break; }
}
if (touched) scanAndReplace();
});
obs.observe(document.body, { childList: true, subtree: true, characterData: true });
// Safety fallback: run a few extra times then disconnect observer after 20s
let runs = 0;
const fallback = setInterval(() => {
scanAndReplace();
runs++;
if (runs > 8) { clearInterval(fallback); obs.disconnect(); }
}, 2000);
console.log('Currency replacement (test) installed — will replace leading $/USD with KES.');
})();