1/** 2 * Japan IR 100 ã®ããã³ãã¨ã³ãæ©è½ãå¦çããã¹ã¯ãªããï¼jQueryéä¾åçï¼ 3 */ 4document.addEventListener('DOMContentLoaded', function() { 5 // ãã£ã«ã¿ã¼ãã¿ã³å¦ç 6 const filterButtons = document.querySelectorAll('.filter-btn'); 7 filterButtons.forEach(function(button) { 8 button.addEventListener('click', function() { 9 // å å¼ãã active ã¯ã©ã¹ãåé¤ 10 const parent = this.parentNode; 11 const siblings = parent.querySelectorAll('.filter-btn'); 12 siblings.forEach(function(sibling) { 13 sibling.classList.remove('active'); 14 }); 15 16 // ã¯ãªãã¯ããããã¿ã³ã« active ã¯ã©ã¹ã追å 17 this.classList.add('active'); 18 19 // ãããã°ãã° 20 console.log('Button clicked:', this.textContent); 21 }); 22 }); 23 24 // ãã£ã«ã¿ã¼ãªã»ãã 25 const filterReset = document.querySelector('.filter-reset'); 26 if (filterReset) { 27 filterReset.addEventListener('click', function(e) { 28 e.preventDefault(); 29 30 const filterGroups = document.querySelectorAll('.filter-group'); 31 filterGroups.forEach(function(group) { 32 const buttons = group.querySelectorAll('.filter-btn'); 33 buttons.forEach(function(btn, index) { 34 if (index === 0) { 35 btn.classList.add('active'); 36 } else { 37 btn.classList.remove('active'); 38 } 39 }); 40 }); 41 42 console.log('Filters reset'); 43 }); 44 } 45 46 // ãããã¼ã¹ã¯ãã¼ã«å¹æ 47 window.addEventListener('scroll', function() { 48 const header = document.querySelector('header'); 49 if (window.scrollY > 50) { 50 header.classList.add('header-compact'); 51 } else { 52 header.classList.remove('header-compact'); 53 } 54 }); 55 56 // æ¤ç´¢ãã¼ã®ãã©ã¼ã«ã¹å¹æ 57 const searchInputs = document.querySelectorAll('.search-container input'); 58 searchInputs.forEach(function(input) { 59 input.addEventListener('focus', function() { 60 this.parentNode.classList.add('focused'); 61 }); 62 63 input.addEventListener('blur', function() { 64 this.parentNode.classList.remove('focused'); 65 }); 66 }); 67 68 // ãããã°æ å ± 69 console.log('DOM loaded, script initialized'); 70 console.log('Filter buttons found:', filterButtons.length); 71 72 // ã¿ã°ãªã³ã¯ï¼data-tag-urlï¼ã®ã¯ãªãã¯é·ç§» 73 // hrefã«custom_tagã¯ã¨ãªãæãããªãï¼ã¯ãã¼ã«å¯¾è±¡ããé¤å¤ããããï¼ä»£ããã« 74 // data-tag-url屿§ã§é·ç§»å ãæãããã¯ãªãã¯æã«JSã§é·ç§»ãã 75 document.addEventListener('click', function(e) { 76 const el = e.target.closest('[data-tag-url]'); 77 if (el) { 78 e.preventDefault(); 79 window.location.href = el.getAttribute('data-tag-url'); 80 } 81 }); 82});
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.