From 8191f7e7ff96c3ce118c29d285f89fc9835ad281 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 14 Apr 2013 23:27:45 -0400 Subject: [PATCH] mark blank outlet names as unnamed --- manifest.json | 2 +- popup.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index df5e568..241098f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "minimum_chrome_version": "22", "name": "Web Power Switch Manager", - "version": "1.1", + "version": "1.2", "description": "Quickly control Web Power Switches", "icons": { "128": "images/outlet-128x128.png" diff --git a/popup.js b/popup.js index 189bbb7..640aa5b 100644 --- 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 = 'unnamed'; + else + cell.innerText = outlet_name + ':'; cell = row.insertCell(-1); button = document.createElement('input'); button.type = 'button'; -- 2.39.2