1(function () { 2 function getPlacementLocale() { 3 try { 4 if (typeof idstc === 'function' && idstc() && typeof idstc().getAfterpayLocaleInfo === 'function') { 5 var info = idstc().getAfterpayLocaleInfo(); 6 if (info && info.placementLocale) { 7 return info.placementLocale; 8 } 9 } 10 } catch (e) { } 11 12 return null; 13 } 14 15 function patchAfterpayCreatePlacements() { 16 if (!window.Afterpay || typeof window.Afterpay.createPlacements !== 'function') { 17 return false; 18 } 19 20 if (window.Afterpay.__flightLocalePatched === true) { 21 return true; 22 } 23 24 var original = window.Afterpay.createPlacements; 25 26 window.Afterpay.createPlacements = function (args) { 27 try { 28 var locale = getPlacementLocale(); 29 if (locale && args && args.attributes) { 30 args.attributes.locale = locale; 31 } 32 } catch (e) { } 33 34 return original.apply(this, arguments); 35 }; 36 37 window.Afterpay.__flightLocalePatched = true; 38 return true; 39 } 40 41 var attempts = 0; 42 (function tick() { 43 attempts += 1; 44 if (patchAfterpayCreatePlacements() || attempts > 50) { 45 return; 46 } 47 setTimeout(tick, 200); 48 })(); 49})(); 50
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.