Archived
1
0
This commit is contained in:
Jeff Becker
2016-04-30 08:30:14 -04:00
parent cc0a0bc269
commit 6c5aed6a3c
3 changed files with 5 additions and 15 deletions

View File

@@ -4,10 +4,6 @@
// released into the public domain by Jeff on 2016-04-30
//
if (typeof _ == 'undefined') {
var _ = function(a) { return a; }
}
// is the filename matching an image?
function filenameIsImage(fname) {
return /\.(gif|jpeg|jpg|png|webp)/.test(fname);
@@ -19,7 +15,7 @@ function setupInlineImage(thumb, url) {
thumb.inlineIsSetUp = true;
var img = thumb.querySelector("img.thumbnail");
var expanded = false;
var oldurl = img.href;
var oldurl = img.src;
img.onclick = function(ev) {
if (expanded) {
img.setAttribute("class", "thumbnail");
@@ -69,4 +65,4 @@ onready(function(){
observer.observe(document.body, {childList: true, subtree: true});
}
})
});

View File

@@ -3,10 +3,6 @@
var configRoot = "";
if (typeof _ == 'undefined') {
var _ = function(a) { return a; };
}
function setupVideo(thumb, url) {
if (thumb.videoAlreadySetUp) return;
thumb.videoAlreadySetUp = true;