summaryrefslogtreecommitdiff
path: root/cgi-bin/details
diff options
context:
space:
mode:
Diffstat (limited to 'cgi-bin/details')
-rwxr-xr-xcgi-bin/details2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgi-bin/details b/cgi-bin/details
index 87c8677..e35abf1 100755
--- a/cgi-bin/details
+++ b/cgi-bin/details
@@ -197,12 +197,14 @@ sub details_view
<script>
(function(){
+var is_mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)
var links = document.querySelectorAll("a")
var audio, music = [], current_index = -1, typing = false
var comment = document.querySelector("#comment")
Array.prototype.slice.apply(links).forEach(function(url){
if (! url.href.match(/(mp3|wav|ogg)/)) return
var index = music.length
+ if (is_mobile) url.href = url.href.replace(/^https/,"http")
music.push(url)
url.addEventListener("click", function(e){
if (e.ctrlKey || e.altKey || e.metaKey || e.shiftKey) return