summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/js/pichat.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js
index bf8bdd9..7708e70 100644
--- a/static/js/pichat.js
+++ b/static/js/pichat.js
@@ -109,8 +109,8 @@ function linkReplace(url) {
return "<a target='_blank' class='youtube' href='" + linkUrl + "'>" +
"<img class='youtube-thumb' width='130' height='97' src='"+Youtube.nextThumbUrl(uri.queryKey.v)+"'>" +
"<img class='youtube-controls' src='/static/img/youtube.controls.png'></a>"
- } else if (type == 'midi') {
- return '<embed src="'+linkUrl+'" loop="true" autostart="false" volume="80" width="150" height="20"><noembed><a href="'+linkUrl+'">'+url+'</a></noembed>'
+ } else if (type == 'midi' || type == 'wav') {
+ return '<embed src="'+linkUrl+'" loop="true" autostart="false" volume="80" width="150" height="20"><a href="'+linkUrl+'">('+uri.file+')</a>'
} else
return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>";
@@ -159,6 +159,10 @@ function getUriType(uri){
if (uri.path.substr(-4) == ".mid" || uri.path.substr(-5) == ".midi")
return "midi"
+
+ if (uri.path.substr(-4) == ".wav")
+ return "wav"
+
return "link";
}