1jQuery(function ($) { 2 // ã¿ã¤ãã«ã®ããã¹ããé«ãã«åããã¦ããªãã³ã° 3 $('.entry-title').each(function () { 4 var $target = $(this); 5 var html = $target.html(); 6 var $clone = $target.clone().css({ 7 opacity: '0', 8 position: 'absolute', 9 overflow: 'visible' 10 }).width($target.width()).height('auto'); 11 12 $target.after($clone); 13 14 while ((html.length > 0) && ($clone.height() > $target.height())) { 15 html = html.substr(0, html.length - 1); 16 $clone.html(html + '...'); 17 } 18 19 $target.html($clone.html()); 20 $clone.remove(); 21 }); 22 23 // ã¹ã¯ãã¼ã«ä½ç½®ã«ãã£ã¦ããã¼è¡¨ç¤º 24 const banner = document.querySelector('.top_our-story_banner'); 25 const target = document.getElementById('topAnchorList'); 26 27 function checkBannerVisibility() { 28 if (!banner || !target) return; 29 const rect = target.getBoundingClientRect(); 30 const center = window.innerHeight / 2; 31 if (rect.top < center && rect.bottom > center) { 32 banner.style.opacity = '1'; 33 banner.style.pointerEvents = 'auto'; 34 } else { 35 banner.style.opacity = '0'; 36 banner.style.pointerEvents = 'none'; 37 } 38 } 39 40 if (banner) { 41 banner.style.opacity = '0'; 42 banner.style.pointerEvents = 'none'; 43 } 44 window.addEventListener('scroll', checkBannerVisibility); 45 window.addEventListener('resize', checkBannerVisibility); 46 checkBannerVisibility(); 47}); 48 49document.addEventListener('DOMContentLoaded', () => { 50 document.querySelectorAll('.movie-sec a').forEach(link => { 51 const video = link.querySelector('video'); 52 if (!video) return; 53 54 video.muted = true; 55 video.setAttribute('muted', ''); 56 video.playsInline = true; 57 video.setAttribute('playsinline', ''); 58 video.preload = 'metadata'; 59 60 const play = () => { 61 const p = video.play(); 62 if (p && typeof p.then === 'function') { 63 p.catch(err => { 64 console.warn('video.play() failed:', err); 65 }); 66 } 67 }; 68 const stop = () => { 69 video.pause(); 70 video.currentTime = 0; 71 }; 72 73 link.addEventListener('mouseenter', play); 74 link.addEventListener('mouseleave', stop); 75 76 let armed = false; 77 link.addEventListener('click', (e) => { 78 if (matchMedia('(hover: none)').matches) { 79 if (!armed) { 80 video.paused ? play() : stop(); 81 armed = true; 82 setTimeout(() => armed = false, 600); 83 } 84 } 85 }); 86 }); 87});
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.