1$(document).ready(function(e) { 2 $("#skipToContent").removeClass('fancy-link'); 3 4 // JavaScript Document 5 6 // Added on 07/31/20 by ech 7 // check if link has an embeded image, if not addClass or check if parent links are specified, if specified do not addClass 8 9 let links = $('a'); 10 const invalidParents = ['.side-nav-desktop', '.tab', '.tabs-title', '.feature-box > .title', '.top-nav']; 11 12 for (let i = 0; i < links.length; i++) { 13 let link = $(links[i]); 14 let hasInvalidParent = false; 15 16 for (let j = 0; j < invalidParents.length; j++) { 17 let parents = $(link.parentsUntil(invalidParents[j])); 18 let lastItem = $(parents[parents.length - 1]); 19 20 if (!lastItem.is('html')) { 21 hasInvalidParent = true; 22 } 23 } 24 25 if (!hasInvalidParent) { 26 // does it not have an image or classes? 27 const classList = link.attr('class'); 28 const hasClasses = (classList === undefined || classList.trim() === '') ? false : true; 29 const isInsideLinkedCard = link.closest('div.card.--linked').length > 0; 30 //const isHiddenAnchor = (link.href === undefined || link.href.trim() === '') ? true : false; 31 32 if (!link.find('img').length && !link.find('div').length && !link.find('input').length && !link.find('svg').length && !hasClasses && !isInsideLinkedCard) { 33 link.toggleClass('fancy-link'); 34 } 35 36 var ahref = link.attr('href'); 37 38 // Check if the href attribute is missing or empty 39 if (!ahref || ahref.trim() === '') { 40 link.removeClass("fancy-link"); 41 } 42 } 43 } 44 45 // Added 08/06/2020 by ech, addClass visited to mailto links 46 $('a[href^="mailto:"]').click(function () { 47 $(this).addClass('visited'); 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.