1/*/*========================================= 2 ++ common.js ++ Ver.1.5.20 3 Last update 2018.11.20 4==========================================*/ 5/* 6 7* 2018 11/20 *ãã©ã¦ã¶å¤å®å¦çã䏿° 8* 2018 10/25 *jQuery 3ç³» ã«å¯¾å¿ 9 10*/ 11 12 13 14/** 15 * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 16 * Dual licensed under MIT and GPL. 17 * @author Ariel Flesler 18 * @version 1.4.3.1 19 */ 20 // EXSAMPLE === $.scrollTo('#Global', 1500); 21 22(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 23 24 25 26//============================================ 27// Detecting Browser & Device Ver.1.4.2 28//============================================ 29 30//++++++++++++ ã¢ãã¤ã«/ã¿ãã¬ãã/ãã©ã¦ã¶å¤å®å¦ç ++++++++++++ 31 32//ãã©ã¦ã¶/ããã¤ã¹ ç¨®å¥ 33var isMobile=false,isTablet=false,isRetina=false,isMobileTablet=false,isAndroid=false;; 34 35 //ã¢ãã¤ã«ãã¿ãã¬ãããå¤å® 36 //https://w3g.jp/blog/js_browser_sniffing2015 37 var _ua = (function(u){ 38 return { 39 Tablet:(u.indexOf("windows") != -1 && u.indexOf("touch") != -1 && u.indexOf("tablet pc") == -1) 40 || u.indexOf("ipad") != -1 41 || (u.indexOf("android") != -1 && u.indexOf("mobile") == -1) 42 || (u.indexOf("firefox") != -1 && u.indexOf("tablet") != -1) 43 || u.indexOf("kindle") != -1 44 || u.indexOf("silk") != -1 45 || u.indexOf("playbook") != -1, 46 Mobile:(u.indexOf("windows") != -1 && u.indexOf("phone") != -1) 47 || u.indexOf("iphone") != -1 48 || u.indexOf("ipod") != -1 49 || (u.indexOf("android") != -1 && u.indexOf("mobile") != -1) 50 || (u.indexOf("firefox") != -1 && u.indexOf("mobile") != -1) 51 | u.indexOf("blackberry") != -1 52 } 53 })(window.navigator.userAgent.toLowerCase()); 54 55 //ã¢ãã¤ã« 56 if(_ua.Mobile){ 57 isMobile=true; 58 isMobileTablet=true; 59 } 60 //ã¿ãã¬ãã 61 if(_ua.Tablet){ 62 isTablet=true; 63 isMobileTablet=true; 64 } 65 66 //Retina Display å¤å® 67 if(window.retina || window.devicePixelRatio > 1){ 68 isRetina=true; 69 } 70 71 //Android å¤å® 72 if (/android[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ 73 isAndroid=true; 74 } 75 76 77 78 79//============================================ 80// ããã¤ã¹ããã©ã¦ã¶å¥ã®å¦ç 81//============================================ 82 83//++++++++++++ ã¢ãã¤ã«/ã¿ãã¬ãã ã¯ã©ã¹è¿½å ++++++++++++ 84(function($) { 85 $(function() { 86 if (isMobile) { 87 //HTMLã«class isMobileã追å 88 $('html').addClass('isMobile'); 89 $('html').addClass('isMobileTablet'); 90 }else if(isTablet){ 91 //HTMLã«class isTabletã追å 92 $('html').addClass('isTablet'); 93 $('html').addClass('isMobileTablet'); 94 } 95 //Retina Display isRetina ã¯ã©ã¹è¿½å 96 if (isRetina) { 97 $('html').addClass('isRetina'); 98 } 99 }); 100})(jQuery); 101 102 103 104 105//============================================ 106// Veiwport åãæ¿ã Tablet 107//============================================ 108 109(function($) { 110 $(function() { 111 112 if (isTablet) { 113 var metalist = document.getElementsByTagName('meta'); 114 for(var i = 0; i < metalist.length; i++) { 115 var name = metalist[i].getAttribute('name'); 116 if(name && name.toLowerCase() === 'viewport') { 117 metalist[i].setAttribute('content', 'target-densitydpi=device-dpi, width=1040, maximum-scale=1.0, user-scalable=yes'); 118 break; 119 } 120 } 121 } 122 123 }); 124})(jQuery); 125 126 127//++++++ Copyright ++++++ OLD
128// Copyright © <script>thisYear()</script> 129function thisYear(){ 130var day=new Date(); 131var year=day.getFullYear(); 132return document.write(year); 133} 134 135//++++++ Copyright ++++++ 136// Copyright <span id="copyYear">©</span> 137(function($) { 138 $(function() { 139 var date=new Date(); 140 var copyYear=date.getFullYear(); 141 copyYear = "© "+copyYear 142 $('#copyYear').html(copyYear); 143 }); 144})(jQuery); 145 146//++++++ Page Anc Scroll ++++++ 147(function($) { 148 $(function() { 149 $(document).on("click","a[href*=#],area[href*=#]", function(){ 150 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 151 && location.hostname == this.hostname) { 152 var $target = $(this.hash); 153 $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']'); 154 if ($target.length) { 155 var targetOffset = $target.offset().top - 20; 156 $('html,body').animate({scrollTop: targetOffset}, 800); 157 return false; 158 } 159 } 160 }); 161 }); 162})(jQuery); 163 164//++++++++++++ Bookmark ++++++++++++ 165//EXSAMPLE bookmark('http://~~~','My Site') 166function bookmark(address,sitename) { 167 if (window.sidebar) { 168 window.sidebar.addPanel(sitename, address,""); 169 } else if( document.all ) { 170 window.external.AddFavorite(address, sitename); 171 } else if( window.opera && window.print ) { 172 173 return true; 174 }else { 175 alert("Ctrl + D ãæ¼ãã¦ãã ãã") 176 } 177} 178//++++++++++++ Bookmark Each ++++++++++++ 179(function($) { 180 $(function() { 181 var address = location.href; 182 var title = document.title; 183 //ãµã¤ãåãè¨å®ï¼ç©ºæ¬ã®å ´åã¯titleã¿ã°ãåå¾ï¼ 184 var sitename = ""; 185 var fevName=""; 186 187 if(sitename == ""){ 188 fevName=title; 189 }else{ 190 fevName=sitename; 191 } 192 //.fevãã¯ãªãã¯ã§çºç« 193 $('.fev').click(function(){ 194 if (window.sidebar) { 195 window.sidebar.addPanel(fevName, address,""); 196 } else if( document.all ) { 197 window.external.AddFavorite(address, fevName); 198 } else if( window.opera && window.print ) { 199 200 return true; 201 }else { 202 alert("Ctrl + D ãæ¼ãã¦ãã ãã") 203 } 204 }); 205 }); 206})(jQuery); 207 208//IE6 Massage 209//if(isIE6){} 210function ie6Mess(){ 211alert('ç³ã訳ããã¾ããã\nã使ãã®ãã©ã¦ã¶ã§ã¯ãã®æ©è½ããå©ç¨ããã ãã¾ããã'); 212} 213 214 215//++++++++++++ ãµãããã²ã¼ã·ã§ã³ãç¾å¨å°è¡¨ç¤º ++++++++++++ 216(function($) { 217 $(function() { 218 219 //ãµãããã®ã¿ã°ãæå® 220 var navTag = ".side_link li" 221 222 //表示URLãããã¡ã¤ã«åãæ½åº 223 var pathURL = location.href; 224 var pathHash = location.hash; 225 pathURL =pathURL.replace(pathHash,''); 226 pathURL =pathURL.replace(/^http:\/\/(.*?)\//,'/'); 227 var path = location.href; 228 path=path.replace(pathHash,''); 229 path=path.replace(/\\/g,'/').replace(/(.*)\//,'' ); 230 231 $(navTag).each(function(){ 232 //ããã®æå®ãªã³ã¯ãåå¾ 233 var myURL = $(this).find('a').attr('href'); 234 myURL =myURL.replace(/^http:\/\/(.*?)\//,'/'); 235 var myHref = $(this).find('a').attr('href'); 236 myHref = myHref.replace(/\\/g,'/').replace(/(.*)\//,'' ); 237 238 //表示URLã¨æå®ãªã³ã¯ãåãå ´å class activeã追å 239 if(myHref!=''){ 240 if(myHref==path){ 241 $(this).addClass('active') 242 } 243 } 244 else if(myURL==pathURL){ 245 $(this).addClass('active') 246 } 247 }); 248 }); 249})(jQuery); 250 251 252//++++++++++++ ãã¦ã¹ãªã¼ãã¼ãç»åã¨ãã§ã¯ã ++++++++++++ 253(function($) { 254 $(function() { 255 256 var targSelector = ".ro a img"; 257 //IE8以ä¸ãå¤å® 258 var isIE_lt9; 259 //opacityããµãã¼ããã¦ããªãã®ã¯ãã£ã¨IE8ä»¥ä¸ 260 if(!jQuery.support.opacity){ 261 isIE_lt9 = true; 262 } 263 //++++++++ç»åã¨ãã§ã¯ãï¼ãªã³ã¯ç»åã®ã¿ï¼+++++ 264 //FF CSSãã°FIX èæ¯è²è¿½å 265 $(targSelector).css("background-color","#ffffff"); 266 //ãã¦ã¹ãªã¼ãã¼å¦ç 267 $(document).on("mouseenter",targSelector, function(){ 268 var imgExtention = $(this).attr('src'); 269 //IE8以ä¸ã¯pngãç¡è¦ 270 if(imgExtention.match(/\.png$/i) && isIE_lt9){ 271 }else{ 272 $(this).animate( { 273 opacity: '0.8' 274 },{duration: 200, easing: 'swing' 275 }); 276 } 277 }); 278 //ãã¦ã¹ã¢ã¦ãå¦ç 279 $(document).on("mouseleave",targSelector, function(){ 280 $(this).animate( { 281 opacity: '1' 282 },{duration: 200, easing: 'swing' 283 }); 284 }); 285 }); 286})(jQuery); 287 288 289 290 291 292//++++++ãªã¹ãã¢ã¤ãã CSS å¶å¾¡+++++++ 293(function($) { 294 $(function() { 295 //æå¾ã®ãã¼ãã¼ãæ¶ã 296 $(".side_link,.entry-content,#newstopics").each(function(){ 297 $(this).find("li:last-child,dl:last-child,.list_support:last-child,.list_newstopics:last-child").css({ 298 "border-bottom-style": "none", 299 "border-bottom-width": "0" 300 }); 301 }); 302 //æå¾ã®ãã¼ã¸ã³ãæ¶ã 303 $(".side_link").each(function(){ 304 $(this).find("li:last-child,dl:last-child").css({ 305 "margin-bottom": "0" 306 }); 307 }); 308 }); 309})(jQuery); 310 311 312//++++++ Retina Display ã¤ã¡ã¼ã¸å·®ãæ¿ã+++++++ 313(function($) { 314 $(function() { 315 //.Retina ã®å ´åãã¤ã¡ã¼ã¸ã®ãã¹ãæ¸ãæã 316 //@2x.jpg or @2x.png 317 $(".Retina").each(function(){ 318 if(isRetina){ 319 var mySrc = $(this).find("img").attr('src'); 320 mySrc = mySrc.replace(/(\.jpg|\.png)/gi,'@2x$1'); 321 $(this).attr('src',mySrc); 322 323 } 324 }); 325 }); 326})(jQuery); 327 328 329//++++++ããåºå®+++++++ 330(function($) { 331 $(function() { 332 var nav = $('#head_box'), 333 offset = nav.offset(); 334 335$(window).scroll(function () { 336 if($(window).scrollTop() > offset.top) { 337 nav.addClass('fixed'); 338 } else { 339 nav.removeClass('fixed'); 340 } 341}); 342 }); 343})(jQuery); 344 345 346 347(function($) { 348$(function() { 349var $grid = $('.grid'), 350 emptyCells = [], 351 i; 352 353// åããã« (ul.cell) ã®æ°ã ã空ã®åããã« (ul.cell.is-empty) ã追å ããã 354for (i = 0; i < $grid.find('.cell').length; i++) { 355 emptyCells.push($('<div>', { class: 'cell is-empty' })); 356} 357 358$grid.append(emptyCells); 359}); 360})(jQuery); 361 362 363 364 365 366$(function(){ 367 fade('.dropmenu'); 368}); 369 370function fade(elm){ 371 var $fade = $(elm), 372 $body = $('body'); 373 // .toggleWrapãé表示ã«ãã¦ãã 374 $fade.addClass('hide'); 375 376 // #toggleãã¯ãªãã¯ãããæã«ã.hideã®ä»ãå¤ãã§ .toggleWrapã®è¡¨ç¤ºã»é表示ãåãæ¿ã 377 // .addClass('animation');ã§ã¢ãã¡ã¼ã·ã§ã³ã®CSSãé©å¿ 378 $('.menu-btn').on('click', function(){ 379 $fade.toggleClass('hide').addClass('animation'); 380 $('.menu-btn').toggleClass('active'); 381 382 // ã¹ã¯ãã¼ã«ã®å¶å¾¡
383 // .hideãæã£ã¦ããç¶æ ã¯ã¡ãã¥ã¼ãéãã¦ããç¶æ ã§ããã®ã¨ãã¯.no-scrollã¯ä¸è¦ 384 if ($fade.hasClass('hide')) { 385 $body.removeClass('no-scroll').off('.noScroll'); 386 } else { 387 // ã¡ãã¥ã¼ãéãã¦ããæã«ãbodyã«.no-scrollã追å ãã¦ã¹ã¯ãã¼ã«ãããªã 388 $body.addClass('no-scroll').on('touchmove.noScroll', function(e){ 389 e.preventDefault(); 390 }); 391 } 392 }); 393} 394 395 396 397//category 398$(function(){ 399 400 $(".CategoryTitle").on("click", function() { 401 $(this).toggleClass("active"); 402 403 $(this).next().slideToggle(); 404 }); 405}) 406 407 408 409 410 411$(function() { 412 var Accordion = function(el, multiple) { 413 this.el = el || {}; 414 // more then one submenu open? 415 this.multiple = multiple || false; 416 417 var dropdownlink = this.el.find('.dropdownlink'); 418 dropdownlink.on('click', 419 { el: this.el, multiple: this.multiple }, 420 this.dropdown); 421 }; 422 423 Accordion.prototype.dropdown = function(e) { 424 var $el = e.data.el, 425 $this = $(this), 426 //this is the ul.submenuItems 427 $next = $this.next(); 428 429 $next.slideToggle(); 430 $this.parent().toggleClass('open'); 431 432 if(!e.data.multiple) { 433 //show only one menu at the same time 434 $el.find('.submenuItems').not($next).slideUp().parent().removeClass('open'); 435 } 436 } 437 438 var accordion = new Accordion($('.accordion-menu'), false); 439}) 440 441 442$(function(){ 443var nav = $('.primaryS'), 444 offset = nav.offset(); 445 446$(window).scroll(function () { 447 if($(window).scrollTop() > offset.top - 20) { 448 nav.addClass('fixed'); 449 } else { 450 nav.removeClass('fixed'); 451 } 452}); 453}); 454
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.