1(function($) { 2 3// st-GlobalNavã°ããã 4 $(function(){ 5 $('.st-GlobalNav_SearchToggleBtn').on('click', function(event) { 6 event.stopPropagation(); 7 $('.st-GlobalNav_Search').addClass('st-GlobalNav_Search-opened'); 8 $('.st-GlobalNav_SearchInput').focus(); 9 }); 10 11 $(document).on('click', function(event) { 12 if (!$(event.target).closest('.st-GlobalNav_Search').length && !$(event.target).closest('.st-GlobalNav_SearchToggleBtn').length) { 13 $('.st-GlobalNav_Search').removeClass('st-GlobalNav_Search-opened'); 14 } 15 }); 16 }); 17 18 // sw-TabGroupã¢ã¸ã¥ã¼ã« 19 $(function(){ 20 var tabs = $('.js-TabGroup').find('.sw-TabGroup_Tab'); 21 tabs.on('click', function () { 22 var clickedTab = $(this); 23 var isActive = clickedTab.hasClass('sw-TabGroup_Tab-active'); 24 25 if (isActive === true) { 26 return false; 27 } 28 29 var tabGroup = clickedTab.parents('.sw-TabGroup'); 30 var contents = tabGroup.find('.sw-TabGroup_Content'); 31 var clickedTabIndex = clickedTab.index(); 32 33 tabGroup 34 .find('.sw-TabGroup_Tab-active') 35 .removeClass('sw-TabGroup_Tab-active'); 36 37 clickedTab.addClass('sw-TabGroup_Tab-active'); 38 39 contents.removeClass('sw-TabGroup_Content-active'); 40 contents.eq(clickedTabIndex).addClass('sw-TabGroup_Content-active'); 41 }); 42 }); 43 44 // æ¤ç´¢ãã¼ã¸ 45 $(function(){ 46 $('.js-page-search-sortByDate').on('click', function(){ 47 $sortForm = $('#page-search-sortForm'); 48 49 $sortForm 50 .find('[name="sort"]') 51 .val('date'); 52 53 $sortForm.submit(); 54 }); 55 56 $('.js-page-search-sortByRelated').on('click', function(){ 57 $sortForm = $('#page-search-sortForm'); 58 59 $sortForm 60 .find('[name="sort"]') 61 .val('related'); 62 63 $sortForm.submit(); 64 }); 65 }); 66 67 $(function(){ 68 $('.c-TableOfContents_Title').on('click', function() { 69 const $toc = $(this).parents('.c-TableOfContents'); 70 if ( $toc.hasClass('c-TableOfContents-closed') ) { 71 $toc.addClass('c-TableOfContents-opened'); 72 $toc.removeClass('c-TableOfContents-closed'); 73 } else { 74 $toc.addClass('c-TableOfContents-closed'); 75 $toc.removeClass('c-TableOfContents-opened'); 76 } 77 }); 78 }); 79 80 // ã¢ãã£ãªã¨ã¤ãåºå®ãã¼ã¸ã§ä½¿ç¨ããã¢ã¼ãã« 81 $(function(){ 82 $('.popup-iframe').magnificPopup({ 83 type: 'iframe', 84 mainClass: 'mfp-fade', 85 removalDelay: 200, 86 preloader: false, 87 fixedContentPos: false 88 }); 89 }); 90 91 $(function(){ 92 $('.js-nextPageButton').on('click', function(){ 93 (window.dataLayer || []).push({event: 'click_nextpage_button'}); 94 }); 95 }); 96 97 //Accordionã¯ãªãã¯æã®å¦ç 98 $(function(){ 99 $('.sw-Accordion_Title').on('click', function() { 100 var $accordionItem = $(this).parents('.sw-Accordion_Item'); 101 102 var $innerFound = $accordionItem.find('.sw-Accordion_Inner'); 103 if ( 0 === $innerFound ) { 104 return; 105 } 106 107 var $accordionInner = $innerFound[0]; 108 109 if ( $accordionItem.hasClass('sw-Accordion_Item-opened') ) { 110 $accordionInner.style.maxHeight = null; 111 $accordionItem.removeClass('sw-Accordion_Item-opened'); 112 113 } else { 114 $accordionInner.style.maxHeight = $accordionInner.scrollHeight + "px"; 115 $accordionItem.addClass('sw-Accordion_Item-opened'); 116 } 117 }); 118 119 $('.sw-Accordion_Title').each( function() { 120 var $accordionItem = $(this).parents('.sw-Accordion_Item'); 121 122 var $innerFound = $accordionItem.find('.sw-Accordion_Inner'); 123 if ( 0 === $innerFound ) { 124 return; 125 } 126 127 var $accordionInner = $innerFound[0]; 128 129 if ( $accordionItem.hasClass('sw-Accordion_Item-opened') ) { 130 $accordionInner.style.maxHeight = $accordionInner.scrollHeight + "px"; 131 } 132 }); 133 }); 134})(jQuery); 135 136document.addEventListener('DOMContentLoaded', () => { 137 // ãã¬ãã¢ã LPãã¼ã¸ ã¢ã³ã¼ãã£ãªã³ 138 let premiumAccordionItem = [...document.getElementsByClassName('premium-accordion_title')]; 139 140 premiumAccordionItem.forEach(element => { 141 element.addEventListener('click', (e) => { 142 let accordionItem = e.target.parentNode; 143 let innerFound = accordionItem.getElementsByClassName('premium-accordion_content'); 144 145 if (innerFound.length === 0) { 146 return; 147 } 148 149 let accordionInner = innerFound[0]; 150
151 if (accordionItem.classList.contains('premium-accordion_item-opened')) { 152 accordionInner.style.maxHeight = null; 153 accordionItem.classList.remove('premium-accordion_item-opened'); 154 } else { 155 accordionInner.style.maxHeight = accordionInner.scrollHeight + "px"; 156 accordionItem.classList.add('premium-accordion_item-opened'); 157 } 158 }); 159 }); 160}); 161 162/** 163 * [Description for isTextTruncated] 164 * 165 * @param {Element} elm element 166 */ 167function isTextTruncated(elm) { 168 let truncated = elm.scrollHeight > (elm.clientHeight + 2); 169 170 console.log(elm.scrollHeight, elm.clientHeight); 171 172 if (truncated) { 173 elm.classList.add('sw-LineTruncated'); 174 } else { 175 elm.classList.remove('sw-LineTruncated'); 176 } 177}
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.