]> git.wh0rd.org - chrome-ext/web-power-switch.git/blobdiff - popup.js
mark blank outlet names as unnamed
[chrome-ext/web-power-switch.git] / popup.js
index 189bbb74d071ab6d74bdb4f2d7b37bd58df6867e..640aa5bb0c03ea23440fabdb54a3e2351106cec8 100644 (file)
--- a/popup.js
+++ b/popup.js
@@ -136,7 +136,10 @@ function initpopup(xhr, state) {
 
                row = tbl.insertRow(-1);
                cell = row.insertCell(-1);
-               cell.innerText = outlet_name + ':';
+               if (outlet_name === '')
+                       cell.innerHTML = '<i>unnamed</i>';
+               else
+                       cell.innerText = outlet_name + ':';
                cell = row.insertCell(-1);
                button = document.createElement('input');
                button.type = 'button';