added soundcloud widget

This commit is contained in:
Jeena Paradies 2013-02-28 00:07:40 +01:00
parent 9ae5b14d26
commit 5d8b6887a6

View file

@ -820,6 +820,10 @@ function(jQuery, Paths, URI, HostApp, Cache) {
var v = word.replace(/https?:\/\/youtu\.be\//, "");
this.addYouTube(v, images);
} else if (word.startsWith("http://soundcloud.com/") || word.startsWith("http://www.soundcloud.com/") || word.startsWith("https://soundcloud.com/") || word.startsWith("https://www.soundcloud.com//")) {
this.addSoundCloud(word, images);
} else if (word.startsWith("http://twitpic.com/") || word.startsWith("https://twitpic.com/")) {
src = "http://twitpic.com/show/thumb/" + word.substring("http://twitpic.com/".length);
@ -856,8 +860,6 @@ function(jQuery, Paths, URI, HostApp, Cache) {
a.appendChild(img);
images.appendChild(a);
}
}
}
}
@ -951,6 +953,10 @@ function(jQuery, Paths, URI, HostApp, Cache) {
$(images).append('<iframe class="vimeo" src="http://player.vimeo.com/video/' + id + '?byline=0&amp;portrait=0" width="100%" height="200" frameborder="0" webkitAllowFullScreen allowFullScreen />');
}
Core.prototype.addSoundCloud = function(url, images) {
$(images).append('<iframe class="soundcloud" src="https://w.soundcloud.com/player/?url=' + url + '" width="100%" height="166" scrolling="no" frameborder="no"></iframe>');
}
return Core;