1(function ($) { 2 const mediaQuery = window.matchMedia('(max-width: 767px)'); 3 $(function () { 4 function mobileSelectbox() { 5 if (mediaQuery.matches === true) { 6 const ua = navigator.userAgent; 7 if (ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0) { 8 $('.js-selectbox-year').addClass('is-active').siblings('.js-filtering-label').removeClass('is-active'); 9 $('.js-selectbox-year').siblings('.js-filtering-content').hide(); 10 11 $('.js-selectbox-year').change(function () { 12 const optionSelectedText = $('.js-selectbox-year option:selected').text(); 13 $(this).siblings('.js-filtering-label').text(optionSelectedText).addClass('is-active'); 14 }); 15 } else { 16 $('.js-selectbox-year').removeClass('is-active'); 17 $('.js-selectbox-year').siblings('.js-filtering-content').removeAttr('style'); 18 } 19 20 21 // valueã«æå®ããå¤ã«é·ç§» 22 $('.js-selectbox-year').on('change', function () { 23 window.location.href = $(this).val(); 24 }); 25 } else { 26 $('.js-selectbox-year').removeClass('is-active'); 27 $('.js-selectbox-year').siblings('.js-filtering-content').removeAttr('style'); 28 } 29 }; 30 31 mediaQuery.addListener(mobileSelectbox); 32 mobileSelectbox(mediaQuery); 33 }); 34 35 // URLããå¹´ãã©ã¡ã¼ã¿ãåå¾ 36 function getYearFromParam() { 37 const query = location.search.substring(1); 38 const parameters = query.split('&'); 39 let result = ''; 40 for (let i = 0; i < parameters.length; i++) { 41 let element = parameters[i].split('='); 42 let paramName = decodeURIComponent(element[0]); 43 let paramValue = decodeURIComponent(element[1]); 44 if (paramName == 'y' && /^[0-9]{4}$/.test(paramValue)){ 45 result = paramValue; 46 break; 47 } 48 } 49 return result; 50 } 51 // å¹´ã®åæã¢ã¯ãã£ã表示 52 $(function () { 53 let y = getYearFromParam(); 54 if (y != ''){ 55 const $yearBtn = $('.js-filtering-year-list').children('li').children('a'); 56 $yearBtn.removeClass('is-active'); 57 $yearBtn.each(function(idx){ 58 if ($(this).text() == y + 'å¹´'){ 59 $(this).addClass('is-active'); 60 return false; 61 } 62 }); 63 } 64 }); 65 66})(window.jQuery);
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.