1// JavaScript Document 2 3 4// Androidã®ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ãå¤å¥ï¼CSSããã¯ç¨ï¼ 5(function($){ 6 if ( navigator.userAgent.indexOf('Android') > 0 ) { 7 $("body").addClass("android"); 8 } 9})(jQuery); 10 11 12//YouTubeã®å ¨ç»é¢è¡¨ç¤ºå¯¾ç 13(function($){ 14 var remove = function(){ 15 $('#sidebar').removeClass('animate'); 16 }; 17 setTimeout(remove, 1700); 18})(jQuery); 19 20 21//ããããæ»ããã¿ã³ 22(function($){ 23 $(window).scroll(function(){ 24 25 var now = $(window).scrollTop(); 26 //æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢(now)ã600ä»¥ä¸ 27 if(now > 600){ 28 //[#page-top]ããã£ãããã§ã¼ãã¤ã³ãã 29 $('#page-top').fadeIn('slow'); 30 //ãã以å¤ã ã£ãããã§ã¼ãã¢ã¦ããã 31 }else{ 32 $('#page-top').fadeOut('slow'); 33 } 34 }); 35 //ãã¿ã³(id:move-page-top)ã®ã¯ãªãã¯ã¤ãã³ã 36 $(document).on('click', '.totop', function(){ 37 //ãã¼ã¸ãããã¸ç§»åãã 38 $('body,html').animate({ 39 scrollTop: 0 40 }, 200); 41 }); 42})(jQuery); 43 44 45// ã¿ãé«ã管çï¼vanilla JSï¼ 46(function(){ 47 'use strict'; 48 49 var parentDiv = document.querySelector('.toppost-list-box-inner'); 50 if(!parentDiv) return; 51 52 // åæåæ¸ã¿ãã§ã㯠53 if(parentDiv.getAttribute('data-initialized') === 'true') return; 54 parentDiv.setAttribute('data-initialized', 'true'); 55 56 // åã¿ãã®é«ããä¿æããé åï¼JavaScript夿°ãªã®ã§å¤é¨ã¹ã¯ãªãããã触ããªãï¼ 57 var tabHeights = []; 58 // ç¾å¨é©ç¨ãã¹ãé«ã 59 var correctHeight = null; 60 var isProtecting = false; 61 62 // é«ããå¼·å¶çã«è¨å®ãã颿° 63 function forceHeight(){ 64 if(correctHeight && correctHeight > 0){ 65 parentDiv.style.setProperty('height', correctHeight + 'px', 'important'); 66 } 67 } 68 69 // MutationObserverã§å¤é¨ã¹ã¯ãªããã®ä¸æ¸ããå³åº§ã«ä¿®æ£ 70 var styleObserver = new MutationObserver(function(){ 71 if(!isProtecting || correctHeight === null) return; 72 requestAnimationFrame(forceHeight); 73 }); 74 styleObserver.observe(parentDiv, { attributes: true, attributeFilter: ['style'] }); 75 76 // é«ããé©ç¨ãã颿° 77 function applyHeight(tabIndex){ 78 if(tabIndex < 0 || tabIndex >= tabHeights.length) return;
79 var h = tabHeights[tabIndex]; 80 if(h && h > 0){ 81 correctHeight = h; 82 isProtecting = true; 83 forceHeight(); 84 } 85 } 86 87 // ãã¼ãå®äºæã«å®è¡ 88 window.addEventListener('load', function(){ 89 var tabs = document.querySelectorAll('.toppost-list-box .autoheight'); 90 var tabBtns = document.querySelectorAll('.tabBtn-mag li'); 91 92 // åã¿ãã®é«ããJavaScripté åã«ä¿åï¼ä¸åº¦ã ãï¼ 93 tabs.forEach(function(tab){ 94 var h = tab.offsetHeight; 95 tabHeights.push(h > 0 ? h : 0); 96 }); 97 98 // ç¾å¨é¸æããã¦ããã¿ããç¹å® 99 var checkedInput = document.querySelector('input[name="switch"]:checked'); 100 var tabIndex = 0; 101 if(checkedInput && checkedInput.id){ 102 var num = parseInt(checkedInput.id.replace('tab-', ''), 10); 103 if(num > 0 && num <= tabs.length) tabIndex = num - 1; 104 } 105 106 // .hFindã¯ã©ã¹ãè¨å® 107 document.querySelectorAll('.hFind').forEach(function(el){ el.classList.remove('hFind'); }); 108 if(tabs[tabIndex]) tabs[tabIndex].classList.add('hFind'); 109 110 // é«ããé©ç¨ 111 applyHeight(tabIndex); 112 113 // ã¯ãªãã¯ã¤ãã³ã 114 tabBtns.forEach(function(btn){ 115 btn.addEventListener('click', function(){ 116 setTimeout(function(){ 117 var tabs = document.querySelectorAll('.toppost-list-box .autoheight'); 118 var checkedInput = document.querySelector('input[name="switch"]:checked'); 119 var tabIndex = 0; 120 if(checkedInput && checkedInput.id){ 121 var num = parseInt(checkedInput.id.replace('tab-', ''), 10); 122 if(num > 0 && num <= tabs.length) tabIndex = num - 1; 123 } 124 125 // .hFindã¯ã©ã¹ã®æ´æ° 126 document.querySelectorAll('.hFind').forEach(function(el){ el.classList.remove('hFind'); }); 127 if(tabs[tabIndex]) tabs[tabIndex].classList.add('hFind'); 128 129 // é«ããé©ç¨ 130 applyHeight(tabIndex); 131 }, 10); 132 133 // first-tabã¯ã©ã¹ã®æ´æ° 134 if(!this.classList.contains('first-tab')){ 135 document.querySelectorAll('.first-tab').forEach(function(el){ el.classList.remove('first-tab'); }); 136 this.classList.add('first-tab'); 137 } 138 }); 139 }); 140 }, {once: true}); 141})(); 142 143 144 145//ãã¬ã¸ã³ã¿ã¤ãã®ã¤ã³ãã£ã¼ãåºåã®ã¿ãã¬ãã端æ«ã®é表示è¨å® 146(function($){ 147 $(document).ready(function() { 148 var w_Size = window.innerWidth; 149 if( w_Size <= 838 ){ 150 $(".pconly").remove(); 151 } 152 }); 153})(jQuery); 154 155 156//ã·ã³ã¿ãã¯ã¹ãã¤ã©ã¤ã¿ã¼ã®è¡çªå·ã¯ã©ã¹ãã¤ãã 157(function($){ 158 $(document).ready(function() { 159 $('.cps-post-main-box pre').addClass('line-numbers'); 160 }); 161})(jQuery); 162 163 164//ã¢ã³ã¼ãã£ãªã³ããã¯ã¹ã®éé 165(function($){ 166 $('.jin-ac-box01-title').click(function(){ 167 $(this).toggleClass("open"); 168 $(this).next().toggleClass("open"); 169 }); 170 $('.jin-ac-box02-title').click(function(){ 171 $(this).toggleClass("open"); 172 $(this).next().toggleClass("open"); 173 }); 174})(jQuery); 175 176/*ç»åã®å¤é¨ãªã³ã¯ã®å¾ãã«ã¢ã¤ã³ã³ãã¤ããªãããã«ãã 177(function($){ 178 $(document).ready(function() { 179 $('a').has('img').addClass('remove-icon'); 180 }); 181})(jQuery); 182*/
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.