From d869d0684dd67cfb0ed4d6ba9c26ff77f0bf3ae8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 14 May 2011 18:14:21 -0400 Subject: [PATCH] Support facebook meta tags. --- web/index.html | 1 + web/js/010-control.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index a6ce833..2a1cb29 100644 --- a/web/index.html +++ b/web/index.html @@ -4,6 +4,7 @@ + PhotoFloat diff --git a/web/js/010-control.js b/web/js/010-control.js index 3bb7976..1c0478d 100644 --- a/web/js/010-control.js +++ b/web/js/010-control.js @@ -173,12 +173,14 @@ $(document).ready(function() { height = maxSize; } $(window).unbind("resize", scaleImage); + var photoSrc = imagePath(current_photo.name, current_album.path, maxSize, false); $("#photo") .attr("width", width).attr("height", height) - .attr("src", imagePath(current_photo.name, current_album.path, maxSize, false)) + .attr("src", photoSrc) .attr("alt", current_photo.name) .attr("title", current_photo.date) .load(scaleImage); + $("head").append(""); var previousPhoto = current_album.photos[ (current_photo_index - 1 < 0) ? (current_album.photos.length - 1) : (current_photo_index - 1) @@ -307,6 +309,7 @@ $(document).ready(function() { var original_title = document.title; var album_cache = new Array(); $(window).hashchange(function() { + $("link[rel=image_src]").remove(); var new_album_cache = window.hashUrl(); var index = new_album_cache.lastIndexOf("/"); if (index != -1 && index != new_album_cache.length - 1) {