1// ãããã¸æ»ããã¿ã³ 2//ã¹ã¯ãã¼ã«ããéã®åãã颿°ã§ã¾ã¨ãã 3function PageTopAnime() { 4 var scroll = window.pageYOffset 5 if (scroll >= 200) { 6 // ä¸ãã200pxã¹ã¯ãã¼ã«ããã 7 document.querySelector('#page-top').classList.remove('RightMove') // #page-topã«ã¤ãã¦ããRightMoveã¨ããã¯ã©ã¹åãé¤ã 8 document.querySelector('#page-top').classList.add('LeftMove') // #page-topã«ã¤ãã¦ããLeftMoveã¨ããã¯ã©ã¹åãä»ä¸ 9 } else { 10 if (document.querySelector('#page-top').classList.contains('LeftMove')) { 11 // ãã§ã«#page-topã«LeftMoveã¨ããã¯ã©ã¹åãã¤ãã¦ããã 12 document.querySelector('#page-top').classList.remove('LeftMove') // LeftMoveã¨ããã¯ã©ã¹åãé¤ã 13 document.querySelector('#page-top').classList.add('RightMove') // RightMoveã¨ããã¯ã©ã¹åã#page-topã«ä»ä¸ 14 } 15 } 16} 17 18// ç»é¢ãã¹ã¯ãã¼ã«ããããåããããå ´åã®è¨è¿° 19window.addEventListener('scroll', function () { 20 PageTopAnime() /* ã¹ã¯ãã¼ã«ããéã®åãã®é¢æ°ãå¼ã¶*/ 21}) 22 23// #page-topãã¯ãªãã¯ããéã®è¨å® 24document.addEventListener('DOMContentLoaded', () => { 25 const topElement = document.querySelector('#top') 26 27 if (topElement) { 28 topElement.addEventListener('click', function (e) { 29 e.preventDefault() 30 window.scrollTo({ 31 top: 0, 32 behavior: 'smooth', 33 }) 34 }) 35 } else { 36 console.error("Element with ID 'top' not found") 37 } 38})
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.