From: Mike Frysinger Date: Mon, 15 Apr 2013 03:27:45 +0000 (-0400) Subject: mark blank outlet names as unnamed X-Git-Tag: v1.2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8191f7e7ff96c3ce118c29d285f89fc9835ad281;p=chrome-ext%2Fweb-power-switch.git mark blank outlet names as unnamed --- 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';