Merge pull request #1416 from dragos-efy/efy

Fix efy sound effects
This commit is contained in:
Bnyro 2022-09-09 17:52:19 +02:00 committed by GitHub
commit 44b95788af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ await importIDB(); }; reader.readAsText(file); });
/*Reset Settings*/ e$all(".efy_localstorage_reset").forEach(x =>{ x.onclick = () => { Object.entries(localStorage).forEach(([k])=>{ if (k.includes('efy')){ localStorage.removeItem(k)} }); location.reload() }}); /*Reset Settings*/ e$all(".efy_localstorage_reset").forEach(x =>{ x.onclick = () => { Object.entries(localStorage).forEach(([k])=>{ if (k.includes('efy')){ localStorage.removeItem(k)} }); location.reload() }});
/*Audio*/ let efyaudio = {}; ['pop','ok','ok2','ok3','ok4','hover','slide','squish','step','error','disabled'].forEach(x => { efyaudio[x] = new Audio(`./efy/audio/${x}.mp3`) }); e$body.addEventListener("pointerdown", efyaudio_fn, {once: true}); /*Audio*/ let efyaudio = {}; ['pop','ok','ok2','ok3','ok4','hover','slide','squish','step','error','disabled'].forEach(x => { efyaudio[x] = new Audio(`./audio/${x}.mp3`) }); e$body.addEventListener("pointerdown", efyaudio_fn, {once: true});
async function efyaudio_fn() { if (localStorage.efy_audio_status == 'on' ){ if (localStorage.efy_audio_click == 'on') { async function efyaudio_fn() { if (localStorage.efy_audio_status == 'on' ){ if (localStorage.efy_audio_click == 'on') {
/*Ok*/ e$body.addEventListener("pointerup", ()=>{ if (event.target.matches('button:not([disabled], [type=submit], [type=reset], [efy_tab], .shaka-overflow-menu button, .shaka-overflow-menu-button, .shaka-back-to-overflow-button), .video-grid>div')) { efyaudio.ok.cloneNode().play() }}); /*Ok*/ e$body.addEventListener("pointerup", ()=>{ if (event.target.matches('button:not([disabled], [type=submit], [type=reset], [efy_tab], .shaka-overflow-menu button, .shaka-overflow-menu-button, .shaka-back-to-overflow-button), .video-grid>div')) { efyaudio.ok.cloneNode().play() }});

BIN
public/audio/disabled.mp3 Normal file

Binary file not shown.

BIN
public/audio/error.mp3 Normal file

Binary file not shown.

BIN
public/audio/hover.mp3 Normal file

Binary file not shown.

BIN
public/audio/ok.mp3 Normal file

Binary file not shown.

BIN
public/audio/ok2.mp3 Normal file

Binary file not shown.

BIN
public/audio/ok3.mp3 Normal file

Binary file not shown.

BIN
public/audio/ok4.mp3 Normal file

Binary file not shown.

BIN
public/audio/pop.mp3 Normal file

Binary file not shown.

BIN
public/audio/slide.mp3 Normal file

Binary file not shown.

BIN
public/audio/squish.mp3 Normal file

Binary file not shown.

BIN
public/audio/step.mp3 Normal file

Binary file not shown.