1// ============================ 2// ãã©ã¡ã¼ã¿è¨æ¸¬ã®ä½¿ãæ¹ 3// ã³ãã¼ãã¿ã³ã§ãã©ã¡ã¼ã¿ãã³ãã¼å¦ç 4// ============================ 5document.addEventListener('DOMContentLoaded', function () { 6 let toast = document.createElement('div'); 7 toast.className = 'copyToast'; 8 document.body.appendChild(toast); 9 10 const buttons = document.querySelectorAll('.copyBtn'); 11 12 buttons.forEach(function (btn) { 13 btn.addEventListener('click', function () { 14 // ãã®ãã¿ã³ãå²ã£ã¦ãã .copyArea å ã® .copyTarget ãæ¢ã 15 const copyArea = btn.closest('.copyArea'); 16 const copyTarget = copyArea.querySelector('.copyTarget'); 17 18 if (!copyTarget) { 19 showToast('ã³ãã¼å¯¾è±¡ãè¦ã¤ããã¾ããã'); 20 return; 21 } 22 23 const text = copyTarget.getAttribute('data-copy'); 24 if (!text) { 25 showToast('ã³ãã¼ããå¤ãè¨å®ããã¦ãã¾ããã'); 26 return; 27 } 28 29 navigator.clipboard.writeText(text).then(() => { 30 showToast('ãã©ã¡ã¼ã¿ãã³ãã¼ãã¾ããã'); 31 }).catch(() => { 32 showToast('ã³ãã¼ã«å¤±æãã¾ããã'); 33 }); 34 }); 35 }); 36 37 function showToast(message) { 38 toast.textContent = message; 39 toast.classList.add('show'); 40 setTimeout(() => { 41 toast.classList.remove('show'); 42 }, 2000); 43 } 44});
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.