Merge https://github.com/OhaiBBQ/diaspora into OhaiBBQ-06464cb
This commit is contained in:
commit
0f6b322333
1 changed files with 11 additions and 11 deletions
|
|
@ -48,10 +48,10 @@ $(document).ready(function(){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
container = document.createElement('div'),
|
container = document.createElement("div"),
|
||||||
$container = $(container).attr("class", "video-container");
|
$container = $(container).attr("class", "video-container"),
|
||||||
|
$videoContainer = $this.parent().siblings("div.video-container");
|
||||||
|
|
||||||
var $videoContainer = $this.siblings("div.video-container");
|
|
||||||
if($videoContainer.length > 0) {
|
if($videoContainer.length > 0) {
|
||||||
$videoContainer.slideUp('fast', function () {
|
$videoContainer.slideUp('fast', function () {
|
||||||
$videoContainer.detach();
|
$videoContainer.detach();
|
||||||
|
|
@ -65,7 +65,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this.data("host") === 'youtube.com') {
|
if($this.data("host") === "youtube.com") {
|
||||||
$container.html(
|
$container.html(
|
||||||
'<a href="//www.youtube.com/watch?v=' + $this.data("video-id") + '" target="_blank">Watch this video on Youtube</a><br />' +
|
'<a href="//www.youtube.com/watch?v=' + $this.data("video-id") + '" target="_blank">Watch this video on Youtube</a><br />' +
|
||||||
'<iframe class="youtube-player" type="text/html" src="http://www.youtube.com/embed/' + $this.data("video-id")+ '"></iframe>'
|
'<iframe class="youtube-player" type="text/html" src="http://www.youtube.com/embed/' + $this.data("video-id")+ '"></iframe>'
|
||||||
|
|
@ -74,12 +74,12 @@ $(document).ready(function(){
|
||||||
$container.html('Invalid videotype <i>'+$this.data("host")+'</i> (ID: '+$this.data("video-id")+')');
|
$container.html('Invalid videotype <i>'+$this.data("host")+'</i> (ID: '+$this.data("video-id")+')');
|
||||||
}
|
}
|
||||||
|
|
||||||
$container.hide();
|
$container.hide()
|
||||||
this.parentNode.insertBefore(container, this.nextSibling);
|
.insertAfter($this.parent())
|
||||||
$container.slideDown('fast');
|
.slideDown('fast');
|
||||||
|
|
||||||
$this.click(function() {
|
$this.click(function() {
|
||||||
$container.slideToggle('fast', function () {
|
$container.slideUp('fast', function() {
|
||||||
$(this).detach();
|
$(this).detach();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue