1/** 2 * 3 * openContactFlag 4 * 5 * Opens the contact flag when the button is clicked and closes it when clicked again 6 * 7 * @param {*} button The button element that was clicked 8 * 9 * @returns void 10 */ 11function openContactFlag(button) { 12 let triggerButton = $(button); 13 let contactFlag = triggerButton.parents('.contact-flag'); 14 contactFlag.toggleClass('open'); 15 if (contactFlag.hasClass('open')) { 16 // hide closeflag button 17 $('.closeflag').hide(); 18 19 $('.flagcontent').slideDown(150); 20 } else { 21 // show closeflag button 22 $('.closeflag').show(); 23 24 $('.flagcontent').slideUp(150); 25 } 26} 27 28/** 29 * 30 * fontSize 31 * 32 * This function sets the font size of the page elements 33 * 34 * @param {*} size The font size to set 35 * 36 * @returns void 37 */ 38function fontSize(size) { 39 let d = new Date(); 40 d.setTime(d.getTime() + (365*24*60*60*1000)); 41 let expires = "expires="+ d.toUTCString(); 42 document.cookie = "fontsize=" + size + ";" + expires + ";path=/"; 43 44 $('main').find('.page-element').each(function () { 45 46 applyFontSizingClass($('header'), size); 47 applyFontSizingClass($('footer'), size); 48 applyFontSizingClass($(this).children('.page-element-inner'), size); 49 50 checkMenuSizes(); 51 52 if ($(this).hasClass('highlight')) { 53 syncHighlightTextAndImage(); 54 positionHighlightContainAuthors(); 55 } else if ($(this).hasClass('news')) { 56 if ($(this).find('.newsmasonry').length > 0) { 57 let newsMasonry = $(this).find('.newsmasonry'); 58 setTimeout(function() { 59 newsMasonry.masonry('layout'); 60 }, 300); 61 } 62 } 63 64 }); 65} 66 67/** 68 * 69 * @param {*} element The element to apply the font size to 70 * @param {*} size The font size to apply 71 * 72 * @returns void 73 */ 74function applyFontSizingClass(element, size) { 75 switch (size) { 76 case 'normal': 77 element.removeClass('biggerfont1'); 78 element.removeClass('biggerfont2'); 79 break; 80 case 'big': 81 element.removeClass('biggerfont2'); 82 element.addClass('biggerfont1'); 83 break; 84 case 'bigger': 85 element.removeClass('biggerfont1'); 86 element.addClass('biggerfont2'); 87 break; 88 } 89}
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.