summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/index.html1
-rw-r--r--web/js/010-control.js5
2 files changed, 5 insertions, 1 deletions
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 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="fragment" content="!" />
+ <meta name="medium" content="image" />
<title>PhotoFloat</title>
<link href="css/styles.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/scripts.min.js"></script>
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("<link rel=\"image_src\" href=\"" + photoSrc + "\" />");
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) {