PageSourceSearch

https://maoukarinchanrpg.com/js/sample_voice.js

js maoukarinchanrpg.com collected 2026-10-04 11:58:49 UTC 731 bytes, 23 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2  const audioPlayer = document.querySelector('audio#audio-player');
3
4  const audioButtons = document.querySelectorAll('.character__audio-btn');
5
6  audioButtons.forEach((button) => {
7    button.addEventListener('click', () => {
8      const audioSrc = button.dataset.audio;
9
10      audioPlayer.src = audioSrc;
11      audioPlayer.play().catch((error) => {
12        console.error('オーディオ再生エラー:', error);
13      });
14
15      audioButtons.forEach((btn) => btn.classList.remove('playing'));
16      button.classList.add('playing');
17    });
18  });
19
20  audioPlayer.addEventListener('ended', () => {
21    audioButtons.forEach((btn) => btn.classList.remove('playing'));
22  });
23});

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.