max height and width for expanded videos

This commit is contained in:
ccd0 2013-11-11 04:03:48 -08:00
parent a16a8aefe7
commit 2e415f7c5c

View File

@ -41,11 +41,11 @@ function setupVideo(thumb, url) {
videoHide.src = configRoot + "cc/collapse.gif"; videoHide.src = configRoot + "cc/collapse.gif";
videoHide.alt = "[ - ]"; videoHide.alt = "[ - ]";
videoHide.title = "Collapse video"; videoHide.title = "Collapse video";
videoHide.style.verticalAlign = "top"; videoHide.style.marginLeft = "-15px";
videoHide.style.marginRight = "2px"; videoHide.style.cssFloat = "left";
videoContainer = document.createElement("div"); videoContainer = document.createElement("div");
videoContainer.style.whiteSpace = "nowrap"; videoContainer.style.paddingLeft = "15px";
videoContainer.appendChild(videoHide); videoContainer.appendChild(videoHide);
videoContainer.appendChild(video); videoContainer.appendChild(video);
thumb.parentNode.insertBefore(videoContainer, thumb.nextSibling); thumb.parentNode.insertBefore(videoContainer, thumb.nextSibling);
@ -64,8 +64,8 @@ function setupVideo(thumb, url) {
hovering = false; hovering = false;
video.style.position = "static"; video.style.position = "static";
video.style.maxWidth = ""; video.style.maxWidth = "100%";
video.style.maxHeight = ""; video.style.maxHeight = window.innerHeight + "px";
video.style.pointerEvents = "auto"; video.style.pointerEvents = "auto";
video.style.display = "inline"; video.style.display = "inline";
@ -132,6 +132,7 @@ function setupVideo(thumb, url) {
loopControls[1].style.fontWeight = "bold"; loopControls[1].style.fontWeight = "bold";
for (var i = 0; i < 2; i++) { for (var i = 0; i < 2; i++) {
setupLoopControl(i); setupLoopControl(i);
loopControls[i].style.whiteSpace = "nowrap";
fileInfo.appendChild(document.createTextNode(" ")); fileInfo.appendChild(document.createTextNode(" "));
fileInfo.appendChild(loopControls[i]); fileInfo.appendChild(loopControls[i]);
} }