{"id":2649,"date":"2026-07-05T14:44:14","date_gmt":"2026-07-05T05:44:14","guid":{"rendered":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/?p=2649"},"modified":"2026-07-05T14:44:14","modified_gmt":"2026-07-05T05:44:14","slug":"post-2649","status":"publish","type":"post","link":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/archives\/2649","title":{"rendered":"Javascript\u306e\u8ab2\u984c\u30c1\u30a7\u30c3\u30af"},"content":{"rendered":"<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u6388\u696d\u3067\u3001Javascript\u3092\u6559\u3048\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u5b66\u751f\u304c\u63d0\u51fa\u3057\u305fHTML\u30d5\u30a1\u30a4\u30eb\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306e\u304c\u5927\u5909\u3067\u3059\u3002<\/p>\n<p>index.html\u3092\u3064\u304f\u3063\u3066\u3001\u6b21\u3005\u3068\u958b\u3051\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u6642\u306b\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u307f\u305f\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u3044\u307e\u3044\u3061\u4f7f\u3044\u52dd\u624b\u304c\u3088\u304f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>AI (Gemini 3.5 Flash)\u306b\u4f5c\u3063\u3066\u3082\u3089\u3063\u305f\u306e\u304c\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3002<\/p>\n<h4>JSView.html<\/h4>\n<pre class='code' style='height:20em'>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n    &lt;meta charset=&quot;UTF-8&quot;&gt;\r\n    &lt;title&gt;Javascript\u30c1\u30a7\u30c3\u30af&lt;\/title&gt;\r\n    &lt;style&gt;\r\n        body { font-family: sans-serif; margin: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }\r\n        \/* \u30bf\u30d6\u30a8\u30ea\u30a2 *\/\r\n        #tabs { display: flex; background: #2c3e50; padding: 5px 5px 0 5px; gap: 2px; overflow-x: auto; }\r\n        .tab { padding: 10px 18px; color: #ecf0f1; background: #34495e; cursor: pointer; border-radius: 4px 4px 0 0; white-space: nowrap; }\r\n        .tab.active { background: #fff; color: #2c3e50; font-weight: bold; }\r\n        \r\n        \/* \u30e1\u30a4\u30f3\u30b3\u30f3\u30c6\u30f3\u30c4\u30a8\u30ea\u30a2 *\/\r\n        #main { display: flex; flex: 1; overflow: hidden; }\r\n        \r\n        \/* \u5de6\u5074\u30ab\u30e9\u30e0\u69cb\u9020 *\/\r\n        #leftcolumn { width: 250px; background: #f8f9fa; border-right: 1px solid #dee2e6; display: flex; flex-direction: column; }\r\n        \r\n        \/* \u5b66\u751f\u5207\u308a\u66ff\u3048\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc *\/\r\n        #student_controller { padding: 10px; background: #fff; border-bottom: 1px solid #dee2e6; display: flex; gap: 6px; }\r\n        .nav-btn { flex: 1; padding: 8px 4px; text-align: center; background: #34495e; color: #fff; font-size: 12px; font-weight: bold; border-radius: 4px; cursor: pointer; user-select: none; white-space: nowrap; }\r\n        .nav-btn:hover { background: #2c3e50; }\r\n        .nav-btn.disabled { background: #ced4da; color: #6c757d; cursor: not-allowed; }\r\n        \r\n        \/* Excel\u30b3\u30d4\u30fc\u5c02\u7528\u30dc\u30bf\u30f3\u306e\u500b\u5225\u30b9\u30bf\u30a4\u30eb *\/\r\n        #copy_list_btn { background: #217346; color: #fff; } \/* Excel\u3092\u30a4\u30e1\u30fc\u30b8\u3057\u305f\u30b0\u30ea\u30fc\u30f3 *\/\r\n        #copy_list_btn:hover { background: #154a2d; }\r\n        #copy_list_btn.success { background: #28a745; } \/* \u30b3\u30d4\u30fc\u6210\u529f\u6642\u306e\u30a8\u30d5\u30a7\u30af\u30c8 *\/\r\n        \r\n        \/* \u5de6\u5074\uff1a\u5b66\u7c4d\u756a\u53f7\u30ea\u30b9\u30c8 *\/\r\n        #sidebar { flex: 1; overflow-y: auto; padding: 10px; }\r\n        .student-item { padding: 8px; margin-bottom: 6px; background: #fff; cursor: pointer; border: 1px solid #ced4da; border-radius: 4px; position: relative; }\r\n        .student-item:hover { background: #e9ecef; }\r\n        .student-item.active { background: #0078d7; color: #fff; }\r\n        \r\n        \/* \u4e0d\u6b63\u7591\u60d1\u306e\u8b66\u544a\u30b9\u30bf\u30a4\u30eb *\/\r\n        .student-item.alert { border: 2px solid #dc3545; background: #fff5f5; }\r\n        .student-item.alert:hover { background: #ffe3e3; }\r\n        .student-item.active.alert { background: #dc3545; color: #fff; }\r\n        .badge { display: inline-block; background: #dc3545; color: white; padding: 2px 6px; font-size: 11px; border-radius: 3px; font-weight: bold; margin-top: 3px; }\r\n        .active .badge { background: white; color: #dc3545; }\r\n        \r\n        \/* \u53f3\u5074\uff1a\u5168\u4f53\u8868\u793a\u30a8\u30ea\u30a2 *\/\r\n        #viewer-container { flex: 1; display: flex; flex-direction: column; background: #fff; }\r\n        #file-info { padding: 12px; background: #f1f3f5; border-bottom: 1px solid #dee2e6; font-size: 14px; line-height: 1.4; color: #333; }\r\n        \r\n        \/* \u5de6\u53f3\u5206\u5272\u7528\u306e\u30d3\u30e5\u30fc\u30a8\u30ea\u30a2 *\/\r\n        #view-area { flex: 1; display: flex; overflow: hidden; background: #fdfdfd; }\r\n        \r\n        \/* \u30d3\u30e5\u30fc\u30a8\u30ea\u30a2\u5de6\uff08\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a\u5074\uff09 *\/\r\n        .view-left { flex: 1; width: 50%; border-right: 2px solid #dee2e6; display: flex; justify-content: center; align-items: center; overflow: auto; background: #fff; }\r\n        #viewer { border: none; width: 100%; height: 100%; }\r\n        #img-viewer { max-width: 100%; max-height: 100%; object-fit: contain; display: block; margin: auto; }\r\n        \r\n        \/* \u30d3\u30e5\u30fc\u30a8\u30ea\u30a2\u53f3\uff08\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u8868\u793a\u5074\uff09 *\/\r\n        .view-right { flex: 1; width: 50%; display: flex; flex-direction: column; background: #fff; overflow: hidden; }\r\n        .code-header { background: #2c3e50; color: #fff; padding: 8px 12px; font-size: 12px; font-weight: bold; }\r\n        #viewer-source { border: none; width: 100%; flex: 1; background: #fafafa; }\r\n        .no-code-message { padding: 20px; color: #777; font-style: italic; text-align: center; }\r\n    &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;div id=&quot;tabs&quot;&gt;&lt;\/div&gt;\r\n&lt;div id=&quot;main&quot;&gt;\r\n    &lt;div id=&quot;leftcolumn&quot;&gt;\r\n        &lt;div id=&quot;student_controller&quot;&gt;\r\n            &lt;div id=&quot;prev_btn&quot; class=&quot;nav-btn disabled&quot; onclick=&quot;navigateStudent(-1)&quot;&gt;\u524d\u3078&lt;\/div&gt;\r\n            &lt;div id=&quot;next_btn&quot; class=&quot;nav-btn disabled&quot; onclick=&quot;navigateStudent(1)&quot;&gt;\u6b21\u3078&lt;\/div&gt;\r\n            &lt;div id=&quot;copy_list_btn&quot; class=&quot;nav-btn&quot; onclick=&quot;copyStudentIdsToClipboard()&quot;&gt;\u540d\u7c3f\u30b3\u30d4\u30fc&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div id=&quot;sidebar&quot;&gt;\u2190 \u5de6\u4e0a\u306e\u30bf\u30d6\u304b\u3089\u56de\u6570\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044&lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div id=&quot;viewer-container&quot;&gt;\r\n        &lt;div id=&quot;file-info&quot;&gt;\u5b66\u751f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u3053\u3053\u306b\u4e2d\u8eab\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002&lt;\/div&gt;\r\n        \r\n        &lt;div id=&quot;view-area&quot;&gt;\r\n            &lt;div class=&quot;view-left&quot;&gt;\r\n                &lt;iframe id=&quot;viewer&quot; style=&quot;display:none;&quot;&gt;&lt;\/iframe&gt;\r\n                &lt;img id=&quot;img-viewer&quot; style=&quot;display:none;&quot;&gt;\r\n            &lt;\/div&gt;\r\n            \r\n            &lt;div class=&quot;view-right&quot;&gt;\r\n                &lt;div class=&quot;code-header&quot;&gt;\ud83d\udcc1 \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\uff08\u30d7\u30ec\u30fc\u30f3\u30c6\u30ad\u30b9\u30c8\u8868\u793a\uff09&lt;\/div&gt;\r\n                &lt;iframe id=&quot;viewer-source&quot; style=&quot;display:none;&quot;&gt;&lt;\/iframe&gt;\r\n                &lt;div id=&quot;source-fallback&quot; class=&quot;no-code-message&quot;&gt;\u5b66\u751f\u3092\u9078\u629e\u3059\u308b\u3068\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u3053\u3053\u306b\u8868\u793a\u3055\u308c\u307e\u3059&lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;script&gt;\r\nconst totalData = {};\r\nconst hashMap = {};\r\nconst existingFolders = [];\r\nlet currentStudentList = [];\r\nlet currentStudentIndex = -1;\r\n\r\nfunction registerList(listData) {\r\n    if (!Array.isArray(listData) || listData.length === 0) return;\r\n\r\n    const firstPath = listData[0][0].replace(\/^\\.\\\/\/, &#039;&#039;);\r\n    const folder = firstPath.split(&#039;\/&#039;)[0];\r\n\r\n    if (!totalData[folder]) {\r\n        totalData[folder] = [];\r\n        existingFolders.push(folder);\r\n    }\r\n\r\n    listData.forEach(item =&gt; {\r\n        const path = item[0];\r\n        const hash = item[1];\r\n        if (!path) return;\r\n\r\n        const cleanPath = path.replace(\/^\\.\\\/\/, &#039;&#039;);\r\n        const parts = cleanPath.split(&#039;\/&#039;);\r\n        const filename = parts[1];\r\n        const id = filename.substring(0, 7); \/\/ \u5b66\u7c4d\u756a\u53f7\r\n\r\n        const studentObj = { id: id, filename: filename, fullpath: cleanPath, hash: hash, isCopy: false, copyWith: [] };\r\n        totalData[folder].push(studentObj);\r\n\r\n        if (!hashMap[hash]) {\r\n            hashMap[hash] = [];\r\n        }\r\n        hashMap[hash].push(studentObj);\r\n    });\r\n}\r\n\r\nfor (let i = 1; i &lt;= 15; i++) {\r\n    const num = String(i).padStart(2, &#039;0&#039;);\r\n    const script = document.createElement(&#039;script&#039;);\r\n    script.src = `list${num}.js`;\r\n    script.onerror = () =&gt; { };\r\n    document.head.appendChild(script);\r\n}\r\n\r\nwindow.addEventListener(&#039;load&#039;, () =&gt; {\r\n    setTimeout(initializeSystem, 500);\r\n});\r\n\r\nfunction initializeSystem() {\r\n    Object.keys(hashMap).forEach(hash =&gt; {\r\n        const list = hashMap[hash];\r\n        if (list.length &gt; 1) {\r\n            list.forEach(target =&gt; {\r\n                target.isCopy = true;\r\n                list.forEach(other =&gt; {\r\n                    if (target.fullpath !== other.fullpath) {\r\n                        target.copyWith.push(other.fullpath);\r\n                    }\r\n                });\r\n            });\r\n        }\r\n    });\r\n\r\n    existingFolders.sort();\r\n\r\n    const tabsContainer = document.getElementById(&#039;tabs&#039;);\r\n    tabsContainer.innerHTML = &#039;&#039;; \r\n    \r\n    if (existingFolders.length === 0) {\r\n        tabsContainer.innerHTML = &#039;&lt;div style=&quot;color:white; padding:10px;&quot;&gt;listxx.js \u30d5\u30a1\u30a4\u30eb\u304c\u4e00\u3064\u3082\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002&lt;\/div&gt;&#039;;\r\n        return;\r\n    }\r\n\r\n    existingFolders.forEach(folder =&gt; {\r\n        const tab = document.createElement(&#039;div&#039;);\r\n        tab.className = &#039;tab&#039;;\r\n        tab.innerText = `${folder}\u56de (${totalData[folder].length}\u4ef6)`;\r\n        tab.id = `tab_${folder}`;\r\n        tab.onclick = () =&gt; selectTab(folder, tab);\r\n        tabsContainer.appendChild(tab);\r\n    });\r\n\r\n    if (existingFolders.length &gt; 0) {\r\n        const latestFolder = existingFolders[existingFolders.length - 1];\r\n        const latestTabEl = document.getElementById(`tab_${latestFolder}`);\r\n        if (latestTabEl) latestTabEl.click();\r\n    }\r\n}\r\n\r\nfunction selectTab(folder, tabEl) {\r\n    document.querySelectorAll(&#039;.tab&#039;).forEach(t =&gt; t.classList.remove(&#039;active&#039;));\r\n    tabEl.classList.add(&#039;active&#039;);\r\n\r\n    const sidebar = document.getElementById(&#039;sidebar&#039;);\r\n    sidebar.innerHTML = &#039;&#039;;\r\n\r\n    \/\/ \u2605\u3053\u3053\u3067\u5b66\u7c4d\u756a\u53f7\u9806\u306b\u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\r\n    totalData[folder].sort((a, b) =&gt; a.id.localeCompare(b.id));\r\n    \r\n    currentStudentList = totalData[folder];\r\n    currentStudentIndex = -1;\r\n    updateControllerButtons();\r\n\r\n    currentStudentList.forEach((student, index) =&gt; {\r\n        const item = document.createElement(&#039;div&#039;);\r\n        item.className = &#039;student-item&#039;;\r\n        item.id = `student_item_${index}`;\r\n        \r\n        const ext = student.filename.split(&#039;.&#039;).pop();\r\n        item.innerHTML = `&lt;div&gt;&lt;strong&gt;${student.id}&lt;\/strong&gt; &lt;small style=&quot;color:#666;&quot;&gt;(${ext})&lt;\/small&gt;&lt;\/div&gt;`;\r\n        \r\n        if (student.isCopy) {\r\n            item.classList.add(&#039;alert&#039;);\r\n            item.innerHTML += `&lt;span class=&quot;badge&quot;&gt;\u26a0\ufe0f\u30b3\u30d4\u30da\u7591\u60d1 (${student.copyWith.length}\u4ef6\u3068\u4e00\u81f4)&lt;\/span&gt;`;\r\n        }\r\n\r\n        item.onclick = () =&gt; selectStudent(student, index);\r\n        sidebar.appendChild(item);\r\n    });\r\n}\r\n\r\nfunction selectStudent(student, index) {\r\n    currentStudentIndex = index;\r\n    \r\n    document.querySelectorAll(&#039;.student-item&#039;).forEach(i =&gt; i.classList.remove(&#039;active&#039;));\r\n    const activeItem = document.getElementById(`student_item_${index}`);\r\n    if (activeItem) {\r\n        activeItem.classList.add(&#039;active&#039;);\r\n        activeItem.scrollIntoView({ behavior: &#039;smooth&#039;, block: &#039;nearest&#039; });\r\n    }\r\n\r\n    updateControllerButtons();\r\n\r\n    let infoHtml = `&lt;strong&gt;\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9:&lt;\/strong&gt; ${student.fullpath}&lt;br&gt;&lt;strong&gt;MD5\u30cf\u30c3\u30b7\u30e5:&lt;\/strong&gt; &lt;code&gt;${student.hash}&lt;\/code&gt;`;\r\n    if (student.isCopy) {\r\n        infoHtml += `&lt;br&gt;&lt;span style=&quot;color:#dc3545; font-weight:bold;&quot;&gt;\u26a0\ufe0f\u4e0d\u6b63\u691c\u51fa\uff08\u5185\u5bb9\u304c\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u5b8c\u5168\u4e00\u81f4\u3057\u3066\u3044\u307e\u3059\uff09:&lt;\/span&gt;&lt;br&gt;&lt;small style=&quot;color:#dc3545;&quot;&gt;${student.copyWith.join(&#039;&lt;br&gt;&#039;)}&lt;\/small&gt;`;\r\n    }\r\n    document.getElementById(&#039;file-info&#039;).innerHTML = infoHtml;\r\n\r\n    const iframe = document.getElementById(&#039;viewer&#039;);\r\n    const img = document.getElementById(&#039;img-viewer&#039;);\r\n    const iframeSource = document.getElementById(&#039;viewer-source&#039;);\r\n    const sourceFallback = document.getElementById(&#039;source-fallback&#039;);\r\n    const ext = student.filename.split(&#039;.&#039;).pop().toLowerCase();\r\n\r\n    iframe.style.display = &#039;none&#039;;\r\n    img.style.display = &#039;none&#039;;\r\n    iframeSource.style.display = &#039;none&#039;;\r\n    sourceFallback.style.display = &#039;none&#039;;\r\n    iframe.src = &#039;about:blank&#039;;\r\n    iframeSource.src = &#039;about:blank&#039;;\r\n\r\n    if ([&#039;png&#039;, &#039;jpg&#039;, &#039;jpeg&#039;, &#039;gif&#039;].includes(ext)) {\r\n        img.src = student.fullpath;\r\n        img.style.display = &#039;block&#039;;\r\n        sourceFallback.textContent = &#039;\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e\u305f\u3081\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3042\u308a\u307e\u305b\u3093&#039;;\r\n        sourceFallback.style.display = &#039;block&#039;;\r\n    } else if ([&#039;html&#039;, &#039;htm&#039;, &#039;txt&#039;, &#039;js&#039;].includes(ext)) {\r\n        iframe.src = student.fullpath;\r\n        iframe.style.display = &#039;block&#039;;\r\n        \r\n        iframeSource.src = student.fullpath + &#039;.txt&#039;;\r\n        iframeSource.style.display = &#039;block&#039;;\r\n    } else {\r\n        iframe.style.display = &#039;block&#039;;\r\n        sourceFallback.innerHTML = `\u76f4\u63a5\u5c55\u958b\u3067\u304d\u306a\u3044\u5f62\u5f0f\uff08.${ext}\uff09\u3067\u3059\u3002`;\r\n        sourceFallback.style.display = &#039;block&#039;;\r\n    }\r\n}\r\n\r\nfunction navigateStudent(direction) {\r\n    const nextIndex = currentStudentIndex + direction;\r\n    if (nextIndex &gt;= 0 &amp;&amp; nextIndex &lt; currentStudentList.length) {\r\n        selectStudent(currentStudentList[nextIndex], nextIndex);\r\n    }\r\n}\r\n\r\nfunction updateControllerButtons() {\r\n    const prevBtn = document.getElementById(&#039;prev_btn&#039;);\r\n    const nextBtn = document.getElementById(&#039;next_btn&#039;);\r\n\r\n    if (currentStudentIndex &gt; 0) {\r\n        prevBtn.classList.remove(&#039;disabled&#039;);\r\n    } else {\r\n        prevBtn.classList.add(&#039;disabled&#039;);\r\n    }\r\n\r\n    if (currentStudentIndex &gt;= 0 &amp;&amp; currentStudentIndex &lt; currentStudentList.length - 1) {\r\n        nextBtn.classList.remove(&#039;disabled&#039;);\r\n    } else {\r\n        nextBtn.classList.add(&#039;disabled&#039;);\r\n    }\r\n}\r\n\r\n\/\/ \u2605\u3010\u65b0\u898f\u6a5f\u80fd\u3011\u5b66\u7c4d\u756a\u53f7\u4e00\u89a7\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u4e00\u62ec\u30b3\u30d4\u30fc\u3059\u308b\u95a2\u6570\r\nfunction copyStudentIdsToClipboard() {\r\n    if (currentStudentList.length === 0) {\r\n        alert(&quot;\u30b3\u30d4\u30fc\u3059\u308b\u5b66\u751f\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30bf\u30d6\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;);\r\n        return;\r\n    }\r\n\r\n    \/\/ \u5b66\u7c4d\u756a\u53f7\u3060\u3051\u3092\u53d6\u308a\u51fa\u3057\u3066\u6539\u884c\uff08\\n\uff09\u3067\u9023\u7d50\r\n    const idListText = currentStudentList.map(student =&gt; student.id).join(&quot;\\n&quot;);\r\n\r\n    \/\/ \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u66f8\u304d\u8fbc\u307f\r\n    navigator.clipboard.writeText(idListText).then(() =&gt; {\r\n        const btn = document.getElementById(&#039;copy_list_btn&#039;);\r\n        const originalText = btn.innerText;\r\n        \r\n        \/\/ \u6210\u529f\u3057\u305f\u3053\u3068\u304c\u8996\u899a\u7684\u306b\u308f\u304b\u308b\u3088\u3046\u306b1.5\u79d2\u9593\u30dc\u30bf\u30f3\u5909\u5316\r\n        btn.innerText = &quot;\u30b3\u30d4\u30fc\u5b8c\u4e86\uff01&quot;;\r\n        btn.classList.add(&#039;success&#039;);\r\n        \r\n        setTimeout(() =&gt; {\r\n            btn.innerText = originalText;\r\n            btn.classList.remove(&#039;success&#039;);\r\n        }, 1500);\r\n    }).catch(err =&gt; {\r\n        alert(&quot;\u30b3\u30d4\u30fc\u306b\u5931\u6557\u3057\u307e\u3057\u305f: &quot; + err);\r\n    });\r\n}\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<h4>\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8<\/h4>\n<p><img decoding=\"async\" src=\"\/labo\/suzuki\/wp-content\/uploads\/2649\/SS-fullpage.png\"><\/p>\n<h4>\u5b9f\u969b\u306e\u3082\u306e<\/h4>\n<p><iframe src=\"\/labo\/suzuki\/wp-content\/uploads\/2649\/JSView.html\" style=\"width: 100%; min-height: 400px;\"><\/iframe><\/p>\n<h3>\u4f7f\u3044\u65b9<\/h3>\n<ol>\n<li>\u5b66\u751f\u304c\u63d0\u51fa\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u6240\u5b9a\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u3044\u308c\u308b\u3002<\/li>\n<li>\u6b21\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u52d5\u304b\u3057\u3066\u3001\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u3092\u53d6\u5f97(list10.js\u3092\u4f5c\u6210)\u3002\n<pre class='code'>\r\nIN=$1\r\nOUTPUT=\"list$IN.js\"\r\n\r\necho \"registerList([\" > $OUTPUT\r\n\r\n# \u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u3057\u3066md5sum\u3092\u5b9f\u884c\uff08\u96a0\u3057\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u9664\u5916\uff09\r\nfind \"$IN\" -maxdepth 1 -type f ! -name \"*.txt\" | while read -r filepath; do\r\n\r\n    # \u30bd\u30fc\u30b9\u8868\u793a\u7528\u306b\u3001\u62e1\u5f35\u5b50 .txt \u3092\u4ed8\u52a0\u3057\u305f\u30b3\u30d4\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\r\n    ln \"$filepath\" \"${filepath}.txt\" 2>\/dev\/null\r\n\r\n    # md5sum\u3092\u53d6\u5f97\u3057\u3001\u30cf\u30c3\u30b7\u30e5\u5024\u3068\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u5206\u89e3\r\n    # \u4f8b: d41d8cd98f00b204e9800998ecf8427e  01\/24X1001_xxx.html\r\n    md5_res=$(md5sum \"$filepath\")\r\n    hash=$(echo \"$md5_res\" | awk '{print $1}')\r\n\r\n    # JSON\/JavaScript\u306e\u914d\u5217\u5f62\u5f0f\u3067\u51fa\u529b\r\n    echo \"  [\\\"$filepath\\\", \\\"$hash\\\"],\" | tee -a $OUTPUT\r\ndone\r\n\r\necho \"]);\" >> $OUTPUT\r\n<\/pre>\n<\/li>\n<li>ViewJS.html\u3092\u958b\u304f\u3002<\/li>\n<\/ol>\n<p>AI\u306f\u4eba\u3092\u611f\u52d5\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u6388\u696d\u3067\u3001Javascript\u3092\u6559\u3048\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u5b66\u751f\u304c\u63d0\u51fa\u3057\u305fHTML\u30d5\u30a1\u30a4\u30eb\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306e\u304c\u5927\u5909\u3067\u3059\u3002 index.html\u3092\u3064\u304f\u3063\u3066\u3001\u6b21\u3005\u3068\u958b\u3051\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u6642\u306b\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u307f\u305f\u308a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,7],"tags":[],"class_list":["post-2649","post","type-post","status-publish","format-standard","hentry","category-javascript","category-programming"],"_links":{"self":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts\/2649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/comments?post=2649"}],"version-history":[{"count":6,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts\/2649\/revisions"}],"predecessor-version":[{"id":2655,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts\/2649\/revisions\/2655"}],"wp:attachment":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/media?parent=2649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/categories?post=2649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/tags?post=2649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}