embed images, and make sure they are activated on a new message is posted
This commit is contained in:
parent
275098a309
commit
2bd15bf3e6
1 changed files with 10 additions and 7 deletions
|
|
@ -88,19 +88,22 @@ var Stream = {
|
||||||
|
|
||||||
setUpAudioLinks: function(){
|
setUpAudioLinks: function(){
|
||||||
$(".stream a[target='_blank']").each(function(){
|
$(".stream a[target='_blank']").each(function(){
|
||||||
if($(this).attr('href').match(/\.gif$|\.jpg$|\.png$|\.jpeg$/)) {
|
var link = $(this);
|
||||||
$(this).hide();
|
if(link.attr('href').match(/\.mp3$|\.ogg$/)) {
|
||||||
$(this).parent().append("<img src='" + this.href + "'</img>");}
|
link.parent().append("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");
|
||||||
|
link.remove();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setUpImageLinks: function(){
|
setUpImageLinks: function(){
|
||||||
$(".stream a[target='_blank']").each(function(){
|
$(".stream a[target='_blank']").each(function(){
|
||||||
if($(this).attr('href').match(/\.mp3$|\.ogg$/)) {
|
var link = $(this);
|
||||||
$(this).hide();
|
if(link.attr('href').match(/\.gif$|\.jpg$|\.png$|\.jpeg$/)) {
|
||||||
$(this).parent().append("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");}
|
link.parent().append("<img src='" + this.href + "'</img>");
|
||||||
|
link.remove();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleComments: function(evt) {
|
toggleComments: function(evt) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue