1/* ==================================================== 2ãpostã 3==================================================== */ 4// ã¯ãªãã¯ããã«ãã´ãªã¼ã® key ãè¨æ¶ãã 5document.addEventListener('click', function (e) { 6 const target = e.target; 7 if (target.classList.contains('categoryBtn')) { 8 const catKey = target.getAttribute('data-category'); 9 10 if (catKey) { 11 sessionStorage.setItem('catKey', catKey); 12 } 13 } 14}); 15 16/* ==================================================== 17ãpostsã 18==================================================== */ 19document.addEventListener('DOMContentLoaded', function () { 20 const listItems = document.querySelectorAll('ul.secPostsCat > li'); 21 const contentArticles = document.querySelectorAll('.js-tabTargetArticle'); 22 const postCatKey = sessionStorage.getItem('catKey'); 23 24 function changeDisplay(catData) { 25 listItems.forEach((cat) => cat.classList.toggle('is-current', cat.getAttribute('data-category') === catData)); 26 27 contentArticles.forEach((art) => { 28 const artCategories = art.getAttribute('data-article').split(' '); 29 art.style.display = catData === 'all' || artCategories.includes(catData) ? 'block' : 'none'; 30 }); 31 } 32 33 //post ã§ã¯ãªãã¯ãããã«ãã´ãªã¼ã¨åãã¿ããé¸æç¶æ ã«ãã 34 if (postCatKey) { 35 changeDisplay(postCatKey); 36 sessionStorage.removeItem('catKey'); 37 } 38 39 //ã¯ãªãã¯ãããã¿ãã«is-currentã¯ã©ã¹ãä»ä¸ åãã«ãã´ãªã¼ã®è¨äºã表示 40 listItems.forEach((cat) => { 41 cat.addEventListener('click', function () { 42 changeDisplay(this.getAttribute('data-category') || 'all'); 43 }); 44 }); 45}); 46
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.