Put photo segment at top and trim slashes from urls.
This commit is contained in:
parent
6d75a3ed64
commit
99be279ae3
@ -10,12 +10,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="title">Photos</div>
|
||||
<div id="album-view">
|
||||
<div id="thumbs">
|
||||
<div id="loading">Loading...</div>
|
||||
</div>
|
||||
<div id="subalbums"></div>
|
||||
</div>
|
||||
<div id="photo-view">
|
||||
<div id="photo-box">
|
||||
<a id="next-photo"><img id="photo" /></a>
|
||||
@ -30,6 +24,12 @@
|
||||
<a id="back">‹</a>
|
||||
<a id="next">›</a>
|
||||
</div>
|
||||
<div id="album-view">
|
||||
<div id="thumbs">
|
||||
<div id="loading">Loading...</div>
|
||||
</div>
|
||||
<div id="subalbums"></div>
|
||||
</div>
|
||||
|
||||
<div id="error-overlay"></div>
|
||||
<div id="error-text">Forgot my camera.</div>
|
||||
|
@ -281,10 +281,14 @@ $(document).ready(function() {
|
||||
var album_cache = new Array();
|
||||
$(window).hashchange(function() {
|
||||
var new_album_cache = location.hash.substring(1);
|
||||
if (new_album_cache.length && new_album_cache[0] == "!")
|
||||
new_album_cache = new_album_cache.substring(1);
|
||||
if (new_album_cache.length && new_album_cache[0] == "/")
|
||||
new_album_cache = new_album_cache.substring(1);
|
||||
if (new_album_cache.length) {
|
||||
if (new_album_cache[0] == "!")
|
||||
new_album_cache = new_album_cache.substring(1);
|
||||
if (new_album_cache[0] == "/")
|
||||
new_album_cache = new_album_cache.substring(1);
|
||||
if (new_album_cache[new_album_cache.length - 1] == "/")
|
||||
new_album_cache = new_album_cache.substring(0, new_album_cache.length - 1);
|
||||
}
|
||||
var index = new_album_cache.lastIndexOf("/");
|
||||
if (index != -1 && index != new_album_cache.length - 1) {
|
||||
previous_photo_cache = current_photo_cache;
|
||||
|
Loading…
Reference in New Issue
Block a user