1/*1745677190000*/ 2$(function () { 3 // Show MFA link if Okta session exists 4 var mfaLink = $('#mfa-link'); 5 if (mfaLink.length) { 6 // Grab the MFA host URL from the data attribute on the link, which is determined in the theme. 7 // That way it's not necessary to determine the URL again here in JavaScript. 8 let mfaHost = mfaLink.attr('data-mfa-host'); 9 10 let authClient = new OktaAuth({ 11 url: 'https://' + mfaHost 12 }); 13 14 authClient.session.exists().then(function (exists) { 15 // Show the MFA management link if an Okta session exists 16 if (exists) { 17 $('#mfa-link').removeClass('d-none'); 18 } 19 }); 20 } 21 22 /** 23 * Open popup player for training modules and demos in a new window 24 */ 25 $(document).on('click', '.popup-player', function () { 26 var url = $(this).attr('href'); 27 28 if (typeof url !== 'undefined') { 29 params = 'width=1024'; 30 params += ', height=768'; 31 params += ', top=0, left=0'; 32 params += ', fullscreen=no'; 33 params += ', toolbar=no'; 34 params += ', status=no'; 35 params += ', menubar=no'; 36 37 newwin = window.open(url, 'popup-player', params); 38 newwin.resizeTo('1024', '768'); 39 if (window.focus) { 40 newwin.focus(); 41 } 42 43 return false; 44 } 45 }); 46 47 // Play/pause button for Bootstrap carousel 48 $(document).on('click', '.carousel-control-btn-pause', function (e) { 49 e.preventDefault(); 50 let carouselId = $(this).data('target'); 51 console.log(carouselId); 52 let icon = $(this).find('span.fas'); 53 icon.toggleClass('fa-pause fa-play'); 54 if (icon.hasClass('fa-pause')) { 55 $(carouselId).carousel('cycle'); 56 } else { 57 $(carouselId).carousel('pause'); 58 } 59 }); 60 61 // Make navbar dropdowns open on hover on larger screen sizes 62 function dropdownOnHover() { 63 if ($(window).width() > 991.98) { 64 $('.navbar .dropdown') 65 .on('mouseenter', function () { 66 $('.dropdown-toggle', this).trigger('click'); 67 }) 68 .on('mouseleave', function () { 69 $('.dropdown-toggle', this).trigger('click').blur(); 70 }); 71 72 $('.navbar-site .dropdown-toggle').on( 73 'click.navigate', 74 function (e) { 75 e.preventDefault(); 76 if (!e.isTrigger) { 77 location.href = this.href; 78 } 79 } 80 ); 81 } else { 82 $('.navbar .dropdown').off('mouseenter').off('mouseleave'); 83 $('.navbar-site .dropdown-toggle').off('click.navigate'); 84 } 85 } 86 dropdownOnHover(); 87 $(window).resize(dropdownOnHover); 88 89 // Add 'external-link' class and '_blank' target to external links in the footer 90 // Created specifically to handle Vulnerability Disclosure Policy, but will work 91 // with any other external link in the footer 92 $('.ccw-nav-footer a') 93 .filter(function () { 94 return this.hostname && this.hostname !== location.hostname; 95 }) 96 .addClass('external') 97 .attr({target: '_blank', rel: 'noopener noreferrer'}) 98 .append(' <span class="sr-only">(opens in a new tab)</span>'); 99});
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.