From: Mike Frysinger Date: Sun, 17 Feb 2013 18:23:44 +0000 (-0500) Subject: add a link to the options page when connection fails X-Git-Tag: v1.1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e981c8374cda5aef50354d7f4f3c7233ee0ffe7b;p=chrome-ext%2Fweb-power-switch.git add a link to the options page when connection fails --- diff --git a/manifest.json b/manifest.json index 23da87f..df5e568 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.0", + "version": "1.1", "description": "Quickly control Web Power Switches", "icons": { "128": "images/outlet-128x128.png" diff --git a/popup.js b/popup.js index a88ed94..7ba21e2 100644 --- a/popup.js +++ b/popup.js @@ -14,7 +14,8 @@ function fetchpage(url, callback) { callback(xhr, state); } else { xhr.setstatus = true; - setstatus('Could not connect; check settings'); + setstatus('Could not connect;
check your ' + + 'settings'); console.log('connect error', state); } } @@ -126,7 +127,7 @@ function initpopup(xhr, state) { function setstatus(msg) { var status = document.getElementById('status'); - status.innerText = msg; + status.innerHTML = msg; status.style.visibility = msg ? '' : 'hidden'; status.style.float = msg ? '' : 'left'; status.style.position = msg ? '' : 'absolute';