Code improvements
This commit is contained in:
parent
51ca8da424
commit
62365a2558
@ -368,10 +368,11 @@ album = {
|
||||
|
||||
getArchive: function(albumID) {
|
||||
|
||||
var link;
|
||||
var link,
|
||||
url = "php/api.php?function=getAlbumArchive&albumID=" + albumID;
|
||||
|
||||
if (location.href.indexOf("index.html")>0) link = location.href.replace(location.hash, "").replace("index.html", "php/api.php?function=getAlbumArchive&albumID=" + albumID);
|
||||
else link = location.href.replace(location.hash, "") + "php/api.php?function=getAlbumArchive&albumID=" + albumID;
|
||||
if (location.href.indexOf("index.html")>0) link = location.href.replace(location.hash, "").replace("index.html", url);
|
||||
else link = location.href.replace(location.hash, "") + url;
|
||||
|
||||
if (lychee.publicMode) link += "&password=" + password.value;
|
||||
|
||||
|
@ -520,10 +520,11 @@ photo = {
|
||||
|
||||
getArchive: function(photoID) {
|
||||
|
||||
var link;
|
||||
var link,
|
||||
url = "php/api.php?function=getPhotoArchive&photoID=" + photoID;
|
||||
|
||||
if (location.href.indexOf("index.html")>0) link = location.href.replace(location.hash, "").replace("index.html", "php/api.php?function=getPhotoArchive&photoID=" + photoID);
|
||||
else link = location.href.replace(location.hash, "") + "php/api.php?function=getPhotoArchive&photoID=" + photoID;
|
||||
if (location.href.indexOf("index.html")>0) link = location.href.replace(location.hash, "").replace("index.html", url);
|
||||
else link = location.href.replace(location.hash, "") + url;
|
||||
|
||||
if (lychee.publicMode) link += "&password=" + password.value;
|
||||
|
||||
@ -539,8 +540,10 @@ photo = {
|
||||
|
||||
getViewLink: function(photoID) {
|
||||
|
||||
if (location.href.indexOf("index.html")>0) return location.href.replace("index.html" + location.hash, "view.php?p=" + photoID);
|
||||
else return location.href.replace(location.hash, "view.php?p=" + photoID);
|
||||
var url = "view.php?p=" + photoID;
|
||||
|
||||
if (location.href.indexOf("index.html")>0) return location.href.replace("index.html" + location.hash, url);
|
||||
else return location.href.replace(location.hash, url);
|
||||
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user