1(() => { 2 'use strict'; 3 4 function applySyzHiding() { 5 const SYZ_PATHS = [ 6 "108/6501", 7 "etfs/us-systematic-small-cap-equity-etf", 8 "featured/us-systematic-small-cap-equity-etf" 9 ]; 10 const country = (window.visitorCountry || '').toUpperCase(); 11 const targetCards = document.querySelectorAll('.js-syz-eval'); 12 13 if (targetCards.length === 0) return; 14 15 // If there is an error, a timeout, or the value is empty (API failed), 16 if (country === 'ERROR' || country === '' || country === 'TIMEOUT') { 17 return; 18 } 19 20 targetCards.forEach(card => { 21 const path = card.getAttribute('data-path'); 22 const isMatch = SYZ_PATHS.some(p => path && path.indexOf(p) > -1); 23 24 if (isMatch && country !== 'US') { 25 card.style.display = 'none'; 26 } 27 }); 28 } 29 30 // Listen for the specific event dispatched in your header.js 31 window.addEventListener('geoip-detected', () => { 32 applySyzHiding(); 33 }); 34 35 // Fallback: If the event already fired before this script loaded 36 if (window.visitorCountry) { 37 applySyzHiding(); 38 } 39})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.