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(){
|
||||
$(".stream a[target='_blank']").each(function(){
|
||||
if($(this).attr('href').match(/\.gif$|\.jpg$|\.png$|\.jpeg$/)) {
|
||||
$(this).hide();
|
||||
$(this).parent().append("<img src='" + this.href + "'</img>");}
|
||||
var link = $(this);
|
||||
if(link.attr('href').match(/\.mp3$|\.ogg$/)) {
|
||||
link.parent().append("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");
|
||||
link.remove();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setUpImageLinks: function(){
|
||||
$(".stream a[target='_blank']").each(function(){
|
||||
if($(this).attr('href').match(/\.mp3$|\.ogg$/)) {
|
||||
$(this).hide();
|
||||
$(this).parent().append("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");}
|
||||
var link = $(this);
|
||||
if(link.attr('href').match(/\.gif$|\.jpg$|\.png$|\.jpeg$/)) {
|
||||
link.parent().append("<img src='" + this.href + "'</img>");
|
||||
link.remove();
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
toggleComments: function(evt) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue