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