]> git.wh0rd.org - chrome-ext/web-power-switch.git/commitdiff
add a link to the options page when connection fails v1.1
authorMike Frysinger <vapier@gentoo.org>
Sun, 17 Feb 2013 18:23:44 +0000 (13:23 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 17 Feb 2013 18:23:44 +0000 (13:23 -0500)
manifest.json
popup.js

index 23da87fc71d51001ba78b415a7a53fcfab0744f0..df5e5689139c077041577a9f6b5ad15925d125f0 100644 (file)
@@ -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"
index a88ed9409e8f4b03250be05d99e6b20fae789d3a..7ba21e2505df7cb947b21b1a30bb5e7b91871813 100644 (file)
--- 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;<br>check your ' +
+                                                 '<a href="' + chrome.extension.getURL('options.html') + '" target=_blank>settings</a>');
                                        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';