(function () { "use strict"; // --- helpers --- var raf = window.requestAnimationFrame || function (cb) { return setTimeout(cb, 16); }; var debounceTimer; function debounce(fn, wait) { return function () { clearTimeout(debounceTimer); debounceTimer = setTimeout(fn, wait); }; } function transform(text) { if (!text) return null; var t = String(text).replace(/\u2013|–/g, "–").replace(/\s+/g, " ").trim(); if (/^Showing the single result$/i.test(t)) return "Found 1 Home Plan!"; var mAll = t.match(/^Showing all ([\d,]+) results$/i); if (mAll) return "Found all " + mAll[1] + " Home Plans!"; var mRange = t.match(/^Showing ([\d,]+)\s*[–-]\s*([\d,]+) of ([\d,]+) results$/i); if (mRange) return "Found " + mRange[1] + "–" + mRange[2] + " of " + mRange[3] + " Home Plans!"; return null; } function rewriteOnce(root) { var el = (root || document).querySelector(".woocommerce-result-count"); if (!el) return; // avoid thrash loops if (el.dataset && el.dataset.mhfpCountDone === "1") return; var src = (el.textContent || el.innerText || "").trim(); var next = transform(src); if (next && next !== src) { el.textContent = next; if (el.dataset) el.dataset.mhfpCountDone = "1"; } } var rewriteAll = debounce(function () { var nodes = document.querySelectorAll(".woocommerce-result-count"); if (!nodes.length) return; nodes.forEach(function (n) { if (n.dataset) n.dataset.mhfpCountDone = ""; }); raf(function () { rewriteOnce(document); }); }, 25); // initial runs document.addEventListener("DOMContentLoaded", function () { rewriteOnce(document); }); window.addEventListener("load", rewriteAll); // MutationObserver (starts when body exists) function startObserver() { if (!document.body) return; var mo = new MutationObserver(function (list) { for (var i = 0; i < list.length; i++) { var m = list[i]; if (!m.addedNodes || !m.addedNodes.length) continue; for (var j = 0; j < m.addedNodes.length; j++) { var node = m.addedNodes[j]; if (node.nodeType !== 1) continue; if ( (node.matches && node.matches(".woocommerce-result-count, .products, .wbwpf-filter-area, .et_pb_shop")) || (node.querySelector && node.querySelector(".woocommerce-result-count")) ) { rewriteAll(); return; } } } }); mo.observe(document.body, { childList: true, subtree: true }); } if (document.body) startObserver(); else document.addEventListener("DOMContentLoaded", startObserver); // --- events we must listen to --- // WooCommerce archive refresh (sorting, pagination, etc.) document.addEventListener("updated_wc_div", rewriteAll); // WBW Product Filter PRO (old & new names) window.addEventListener("wpf_ajax_success", rewriteAll); window.addEventListener("wbwpf_ajax_success", rewriteAll); document.addEventListener("wbwpf_after_ajax_products", rewriteAll); // Divi shop module AJAX document.addEventListener("et_ajax_complete", rewriteAll); // Generic jQuery ajaxComplete safety net if (window.jQuery) { jQuery(document).ajaxComplete(function (_e, _xhr, settings) { if (!settings || !settings.url) return; if (/wbwpf|product-filter|wc-ajax|et_pb_shop|orderby|paged=/i.test(settings.url)) rewriteAll(); }); } })(); 3 Archives - Page 5 of 66 - My Home Floor Plans

✓  CAD FILE INCLUDED

✓ FREE UNLIMITED BUILD

✓ OPTIONS INCLUDED

✓ PREVIEW ALL SHEETS

✓ STRUCTURAL INCLUDED

✓ FREE FND CHANGES

10 Hours FREE Drafting/Modifications INCLUDED. Larger projects cost LESS THAN HALF of competitors. Learn More ➜ We’re still polishing up some details—please use product images to confirm features while we complete reviews.

3