Archived
1
0
This commit is contained in:
Jeff Becker
2016-04-30 08:40:21 -04:00
parent 6a73f5d727
commit 14cf2cbe5b
3 changed files with 11 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ function setupInlineImage(thumb, url) {
var expanded = false;
var oldurl = img.src;
thumb.href = "#";
thumb.target = "";
thumb.target = undefined;
img.addEventListener("click", function(ev) {
if (expanded) {
img.setAttribute("class", "thumbnail");

View File

@@ -3,6 +3,10 @@
var configRoot = "";
if (typeof _ == 'undefined') {
var _ = function(a) { return a; };
}
function setupVideo(thumb, url) {
if (thumb.videoAlreadySetUp) return;
thumb.videoAlreadySetUp = true;
@@ -208,8 +212,8 @@ function setupVideosIn(element) {
if (/(\.webm)|(\.mp4)$/.test(thumbs[i].pathname)) {
setupVideo(thumbs[i], thumbs[i].href);
} else {
var url = thumbs[i].href
if (/(\.webm)|(\.mp4)$/.test(url)) setupVideo(thumbs[i], url);
var url = thumbs[i].href;
if (/(\.webm)|(\.mp4)$/.test(url)) setupVideo(thumbs[i], url);
}
}
}