1// HelpCenter SfCustomer observer + Angular notification. Moved out of an inline <script> 2// in HelpCenter/Views/Shared/_MainAngularLayout.cshtml for CSP hardening. Behavior unchanged. 3var helpCenterObserver = {}; 4(function () { 5 initSfCustomerObserver(); 6 //setTimeout(function () { 7 // initObserver(); 8 //}, 50); 9})(); 10 11 12function initSfCustomerObserver() { 13 helpCenterObserver.id = 12; 14 helpCenterObserver.update = receiveNotification_SfCustomer; 15 16 try { 17 if (window.$SfCustomerSubject !== undefined) { 18 var customSubj = window.$SfCustomerSubject; 19 customSubj.addObserver(helpCenterObserver); 20 } 21 } catch (exception) { 22 //TODO: log exception in the logger 23 console.log(exception); 24 } 25 26} 27 28function receiveNotification_SfCustomer(context) { 29 helpCenterObserver.context = context; 30 setTimeout(function (context) { 31 notifyHelpCenterAngularApp(context); 32 }, 33 150, 34 context); 35 36} 37 38function notifyHelpCenterAngularApp(context) { 39 if (window.angularHcNotifySfCustCheckLogin !== undefined && 40 window.angularHcNotifySfCustCheckLogin.zone !== undefined) { 41 window.angularHcNotifySfCustCheckLogin.zone.run(() => { 42 window.angularHcNotifySfCustCheckLogin 43 .componentFn(context) 44 //.subscribe(result => { 45 // 46 //}) 47 }); 48 } 49}
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.