1$(function(){ 2 3 // ããã¹ãã¿ã 4 $.fn.textTab({defaultSelect:0,cookie:'topTab',tabs:$("#top-tab .list li"),pages:$("#top-tab .box")}); 5 6 $.fn.textTab({defaultSelect:0,cookie:'serviceTab',tabs:$("#service-tab .list li"),pages:$("#service-tab .box")}); 7 8 $.fn.textTab({defaultSelect:0,cookie:'newseTab',tabs:$("#news-tab .list li"),pages:$("#news-tab .box")}); 9 10 11 // åºåã¯ãªãã¯ãã«ã¦ã³ããã(GA4) 12 $('.js-kb-click .list a').bannerClick2({}); 13 14 $.fn.bousaiListViewCustom = function(config) { 15 // åæå¤ 16 config = $.extend({ 17 rssPath: site_domain + '/cgi-bin/bosai_info.php', 18 ulClass: '.list', 19 textClass: '.text', 20 dateClass: '.date', 21 dateformat: 'YYYYå¹´MMæDDæ¥(WW)', 22 limit: 5, // â 追å 23 noDataView: 0 // â 追å ï¼å¿ è¦ã«å¿ãã¦ï¼ 24 },config); 25 26 // ãã©ã¡ã¼ã¿ã¼ã®ã¨ã©ã¼å¤å® 27 var errorMsg = ''; 28 for(key in config) { 29 var value = config[key]; 30 // 空æåã®å¤å® 31 if(value === '') { 32 errorMsg += 'ã¨ã©ã¼ï¼' + key + 'ã«ç©ºæåãå ¥ã£ã¦ãã¾ã\n'; 33 } else { 34 // æ°å¤ãã©ããã®å¤å® 35 if(key === 'limit' || key === 'noDataView') { 36 if($.type(value) !== 'number'){ 37 errorMsg += 'ã¨ã©ã¼ï¼' + key + 'ã«æååãå ¥ã£ã¦ãã¾ã\n'; 38 } 39 // æååãã©ããã®å¤å® 40 } else { 41 if($.type(value) !== 'string') { 42 errorMsg += 'ã¨ã©ã¼ï¼' + key + 'ã«æ°å¤ãå ¥ã£ã¦ãã¾ã\n'; 43 } 44 } 45 } 46 } 47 // ã¨ã©ã¼ããã°å®è¡ããªã 48 if(errorMsg) { 49 console.error(errorMsg); 50 // ã¨ã©ã¼ãªããã°å®è¡ 51 } else { 52 $.ajax({
53 url:config.rssPath, 54 timeout: 10000, 55 dataType: 'json', 56 context:this, 57 success:function(json){ 58 var itemList = json.data; //xmlé åã夿°ã«æ ¼ç´ 59 var $parentBox = this; //表示ã¨ãªã¢ã鏿 60 var $smartAlertUlBox = $parentBox.find(config.ulClass); //ulã¿ã°ã鏿 61 var $li = $smartAlertUlBox.find('li:first'); //liã¿ã°ã鏿 62 var litags = ''; 63 // -------------------------------------------- 64 //ã¢ã©ã¼ããããã° 65 if(itemList.length){ 66 //xmlãã¼ã¿ãã¾ãã 67 $(itemList).each(function(idx){ 68 if(idx >= config.limit){ 69 return false; 70 } 71 //ã¢ã©ã¼ãå 容ã®ä½æ 72 var smartAlertTitle = this.title; 73 var smartAlertLink = this.url; 74 var smartAlertdate = this.date; 75 //ãªã³ã¯ã®æ¿å ¥ 76 if($li.find('a').length) { 77 $li.find('a').attr('href', smartAlertLink); 78 } 79 //ã¢ã©ã¼ãå å®¹ã®æ¿å ¥ 80 if($li.find(config.textClass).length) { 81 $li.find(config.textClass).text(smartAlertTitle); 82 } 83 //ã¢ã©ã¼ãæ¥ä»ã®æ¿å ¥ 84 if($li.find(config.dateClass).length) { 85 $li.find(config.dateClass).text(smartAlertdate); 86 } 87 litags += $li.prop('outerHTML'); 88 }); 89 //追å 90 $smartAlertUlBox.html(litags); 91 // ã¨ãªã¢ã®è¡¨ç¤º 92 $parentBox.css('display', 'block'); 93 94 // -------------------------------------------- 95 //ã¢ã©ã¼ãããªããã° 96 // -------------------------------------------- 97 } else { 98 if(config.noDataView) { 99 $parentBox.css('display', 'block'); 100 $li = config.noDataClass ? $(config.noDataClass) : '<li>ç¾å¨ãç½å®³ã»æ°è±¡æ å ±ã¯ããã¾ããã</li>'; 101 $smartAlertUlBox.html($li); 102 } else { 103 $parentBox.remove(); //ã¨ãªã¢ãã¨åé¤ 104 } 105 } 106 } 107 }); 108 } 109 return this; 110 }; 111 112 113 // é²ç½ç¡ç·ã«ã¹ã¿ã ã®åºå 114 $('#bousai').bousaiListViewCustom({ 115 rssPath: site_domain + '/cgi-bin/bosai_info.php', 116 ulClass: '.list', 117 textClass: '.item-title', 118 dateClass: '.date', 119 noDataView: 1 120 }) 121 122 123 splide({ 124 splideElement: '#image-carousel', 125 pcMinSlideLength: 1, 126 spMinSlideLength: 1, 127 type: 'loop', 128 autoplay: true, 129 pagination: true, 130 perMove: 1, 131 speed: 1000, 132 interval: 5000, 133 autoWidth: true, 134 focus: "center", 135 arrows: false, // ç¢å°ãã¿ã³ãé表示 136 pauseOnHover: boolean = false, 137 classes: { 138 pagination: "splide__pagination your-class-pagination", 139 page: "splide__pagination__page your-class-page", 140 }, 141 }); 142 143 144 145 splide({ 146 splideElement: '#image-carousel2', 147 pcMinSlideLength: 3, 148 spMinSlideLength: 1, 149 type: 'loop', 150 autoplay: true, 151 pagination: true, 152 perPage: 3, 153 perMove: 1, 154 speed: 1000, 155 interval: 5000, 156 autoWidth: true, 157 focus: "center", 158 arrows: true, // ç¢å°ãã¿ã³ãé表示 159 pauseOnHover: boolean = false, 160 gap: '20px', 161 classes: { 162 pagination: "splide__pagination your-class-pagination", 163 page: "splide__pagination__page your-class-page", 164 }, 165 navigation: { 166 nextEl: ".swiper-button-next", 167 prevEl: ".swiper-button-prev", 168 }, 169 breakpoints: { 170 768: { 171 perPage: 1, 172 gap: '13px', 173 }, 174 }, 175 }); 176 177 splide({ 178 splideElement: '#image-carousel3', 179 pcMinSlideLength: 3, 180 spMinSlideLength: 1, 181 type: 'loop', 182 autoplay: true, 183 pagination: true, 184 perPage: 3, 185 perMove: 1, 186 speed: 1000, 187 interval: 5000, 188 autoWidth: true, 189 focus: "center", 190 arrows: true, // ç¢å°ãã¿ã³ãé表示 191 pauseOnHover: boolean = false, 192 gap: '20px', 193 classes: { 194 pagination: "splide__pagination your-class-pagination", 195 page: "splide__pagination__page your-class-page", 196 }, 197 navigation: { 198 nextEl: ".swiper-button-next", 199 prevEl: ".swiper-button-prev", 200 }, 201 breakpoints: { 202 768: { 203 perPage: 1, 204 gap: '15px', 205 }, 206 }, 207 }); 208 209}); 210 211 212 213
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.