Przeglądaj źródła

Set title to include hostname if hostname is present

Christopher Mullins 6 lat temu
rodzic
commit
1799599ce9
2 zmienionych plików z 8 dodań i 2 usunięć
  1. 2 2
      dist/index.html.gz.h
  2. 6 0
      web/src/js/script.js

Plik diff jest za duży
+ 2 - 2
dist/index.html.gz.h


+ 6 - 0
web/src/js/script.js

@@ -584,6 +584,12 @@ var loadSettings = function() {
       }
     });
 
+    if (val.hostname) {
+      var title = "MiLight Hub: " + val.hostname;
+      document.title = title;
+      $('.navbar-brand').html(title);
+    }
+
     if (val.group_id_aliases) {
       aliasesSelectize.clearOptions();
       Object.entries(val.group_id_aliases).forEach(function(entry) {