diff options
| -rwxr-xr-x | cgi-bin/details | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cgi-bin/details b/cgi-bin/details index dc245cf..87c8677 100755 --- a/cgi-bin/details +++ b/cgi-bin/details @@ -204,7 +204,11 @@ Array.prototype.slice.apply(links).forEach(function(url){ if (! url.href.match(/(mp3|wav|ogg)/)) return var index = music.length music.push(url) - url.addEventListener("click", function(e){ e.preventDefault(); play(index) }) + url.addEventListener("click", function(e){ + if (e.ctrlKey || e.altKey || e.metaKey || e.shiftKey) return + e.preventDefault() + play(index) + }) }) if (music.length) { audio = document.createElement("audio") @@ -236,7 +240,7 @@ function toggle(){ else audio.pause() } function keydown(e){ - if (typing) return + if (typing || e.ctrlKey || e.altKey || e.metaKey || e.shiftKey) return switch (e.keyCode) { case 37: // left prev() |
