Use document.title as standard-title

This commit is contained in:
Tobias Reich 2014-03-30 00:20:00 +01:00
parent 032e972ece
commit 232e963bcc
2 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,6 +7,7 @@
var lychee = { var lychee = {
title: "",
version: "2.1.1", version: "2.1.1",
api_path: "php/api.php", api_path: "php/api.php",
@ -224,8 +225,10 @@ var lychee = {
setTitle: function(title, editable) { setTitle: function(title, editable) {
if (title==="Albums") document.title = "Lychee"; if (lychee.title==="") lychee.title = document.title;
else document.title = "Lychee - " + title;
if (title==="Albums") document.title = lychee.title;
else document.title = lychee.title + " - " + title;
if (editable) $("#title").addClass("editable"); if (editable) $("#title").addClass("editable");
else $("#title").removeClass("editable"); else $("#title").removeClass("editable");