Add remote server name to page title / tab

Makes selecting one of several servers easier.
This commit is contained in:
Dave C-J 2014-11-07 12:28:19 +00:00
parent b861f490c6
commit 5c5de028da
1 changed files with 6 additions and 2 deletions

View File

@ -205,7 +205,7 @@ var RED = (function() {
var i,m;
var typeList;
var info;
if (topic == "node/added") {
var addedTypes = [];
for (i=0;i<msg.length;i++) {
@ -245,7 +245,7 @@ var RED = (function() {
typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
RED.notify("Node"+(msg.types.length!=1 ? "s":"")+" added to palette:"+typeList,"success");
});
}
}
}
} else if (topic == "node/disabled") {
if (msg.types) {
@ -321,6 +321,10 @@ var RED = (function() {
RED.comms.connect();
});
if ((window.location.hostname !== "localhost") && (window.location.hostname !== "127.0.0.1")) {
document.title = "Node-RED : "+window.location.hostname;
}
return {
};
})();