top of page

Now accepting intensive therapy appointments.

This is the start of your journey.

Get in Touch

17821 17th St Ste 260 

Tustin, CA 92780

657-201-7331

I am interested in:
The Healing Journey Counseling

The Healing Journey Counseling

Compassionate holistic therapy for adults seeking inner peace & self trust in person in Orange County & online across CA

Office - 17821 17th St Ste 260  Tustin CA

Email - kerrymartinellimft@gmail.com

Call or text - 657-201-7331

© 2024 The Healing Journey Counseling

All rights reserved.

bottom of page
// 4. DUPLICATE MODULE PREVENTION: Block redundant script loading const duplicateModules = [ 'gsap-core', 'CSSPlugin', 'get-intrinsic', 'object-inspect', 'url', 'fedops-logger', 'animations-kit' ]; // Track loaded modules to prevent duplicates window._loadedModules = window._loadedModules || new Set(); // Override script loading to prevent duplicates const originalCreateElement = document.createElement; document.createElement = function(tagName) { const element = originalCreateElement.call(this, tagName); if (tagName.toLowerCase() === 'script') { const originalSetAttribute = element.setAttribute; element.setAttribute = function(name, value) { if (name === 'src' && value) { // Check if this is a duplicate module const isDuplicate = duplicateModules.some(module => value.includes(module) && window._loadedModules.has(module) ); if (isDuplicate) { console.log('🚫 Blocked duplicate module:', value); return; // Don't set src, preventing load } // Track loaded modules duplicateModules.forEach(module => { if (value.includes(module)) { window._loadedModules.add(module); } }); } return originalSetAttribute.call(this, name, value); }; } return element; }; // 5. LEGACY JAVASCRIPT SKIP: Modern browsers don't need polyfills if (window.fetch && window.Promise && window.Map && window.Set) { // Block common polyfill patterns const legacyPatterns = [ 'polyfill', 'babel-polyfill', 'core-js', 'es6-shim', 'fetch-polyfill' ]; // Prevent legacy script loading const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { mutation.addedNodes.forEach((node) => { if (node.tagName === 'SCRIPT' && node.src) { const isLegacy = legacyPatterns.some(pattern => node.src.includes(pattern) ); if (isLegacy) { console.log('🚫 Blocked legacy script:', node.src); node.remove(); } } }); }); }); observer.observe(document.head, { childList: true, subtree: true }); observer.observe(document.body, { childList: true, subtree: true }); } // 6. DOM CLEANUP: Remove unnecessary elements after page load document.addEventListener('DOMContentLoaded', function() { setTimeout(() => { // Remove hidden Wix elements that aren't needed const hiddenElements = document.querySelectorAll('[style*="display: none"]:not([data-keep])'); hiddenElements.forEach(el => { // Keep important hidden elements (forms, modals, etc.) if (!el.closest('[data-testid="richTextElement"]') && !el.closest('[data-testid="buttonElement"]') && !el.getAttribute('data-automation-id')) { el.remove(); console.log('🗑️ Removed hidden element:', el.tagName); } }); // Remove empty Wix containers const emptyContainers = document.querySelectorAll('[id*="comp-"]:empty, [data-testid*="container"]:empty'); emptyContainers.forEach(container => { container.remove(); console.log('🗑️ Removed empty container:', container.id); }); // Remove excessive nested divs (more than 5 levels deep) const deepNesting = document.querySelectorAll('div > div > div > div > div > div'); deepNesting.forEach(el => { if (el.children.length === 0 && el.textContent.trim() === '') { el.remove(); console.log('🗑️ Removed deeply nested empty div'); } }); // Remove invisible elements with zero dimensions const invisibleElements = Array.from(document.querySelectorAll('*')).filter(el => { const rect = el.getBoundingClientRect(); return rect.width === 0 && rect.height === 0 && el.children.length === 0 && el.textContent.trim() === ''; }); invisibleElements.forEach(el => { // Skip essential elements if (!['SCRIPT', 'STYLE', 'META', 'LINK', 'HEAD'].includes(el.tagName)) { el.remove(); console.log('🗑️ Removed invisible element:', el.tagName); } }); // Clean up redundant Wix tracking/analytics elements const trackingElements = document.querySelectorAll('[data-automation-id*="track"], [data-testid*="analytics"]'); trackingElements.forEach(el => { if (!el.textContent.trim() && el.children.length === 0) { el.remove(); console.log('🗑️ Removed tracking element'); } }); // Report final DOM count const finalCount = document.querySelectorAll('*').length; console.log('✅ DOM cleanup complete. Elements remaining:', finalCount); }, 2000); // Wait 2 seconds after DOM ready to ensure Wix is fully loaded }); // 7. PREVENT UNNECESSARY DOM CREATION: Block non-essential widget loading const originalAppendChild = Element.prototype.appendChild; Element.prototype.appendChild = function(newChild) { // Block non-essential tracking/analytics elements if (newChild.nodeType === 1) { // Element node const blockPatterns = [ 'fedops', 'sentry-track', 'wix-analytics', 'bi-logger' ]; const shouldBlock = blockPatterns.some(pattern => newChild.className?.includes(pattern) || newChild.id?.includes(pattern) || newChild.getAttribute('data-testid')?.includes(pattern) ); if (shouldBlock) { console.log('🚫 Blocked non-essential element creation:', newChild.tagName, newChild.className); return newChild; // Return without appending } } return originalAppendChild.call(this, newChild); };