From 5c5de028daf94cc031e2761aa70e8ac78f7df917 Mon Sep 17 00:00:00 2001 From: Dave C-J Date: Fri, 7 Nov 2014 12:28:19 +0000 Subject: [PATCH] Add remote server name to page title / tab Makes selecting one of several servers easier. --- public/red/main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/red/main.js b/public/red/main.js index 94837382f..aad40c9fc 100644 --- a/public/red/main.js +++ b/public/red/main.js @@ -205,7 +205,7 @@ var RED = (function() { var i,m; var typeList; var info; - + if (topic == "node/added") { var addedTypes = []; for (i=0;i
  • ")+"
  • "; 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 { }; })();