summaryrefslogtreecommitdiff
path: root/chrome/content/accountWizard/bitmaskMessengerOverlay.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/content/accountWizard/bitmaskMessengerOverlay.js')
-rw-r--r--chrome/content/accountWizard/bitmaskMessengerOverlay.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/content/accountWizard/bitmaskMessengerOverlay.js b/chrome/content/accountWizard/bitmaskMessengerOverlay.js
new file mode 100644
index 0000000..aa6bff8
--- /dev/null
+++ b/chrome/content/accountWizard/bitmaskMessengerOverlay.js
@@ -0,0 +1,23 @@
+window.addEventListener("load", function() {
+ overlayStartup();
+}, false);
+
+window.setInterval(function() {
+ overlayStartup();
+}, 3000);
+
+function overlayStartup() {
+ let myPanel = document.getElementById("bitmaskStatusBarPanel");
+
+ // We just need to check if bitmaskd is running and if we were able to
+ // authorize with it using the token from bitmask.js
+ let promise = bitmask.core.status();
+ promise.then(function(data) {
+ myPanel.label = "bitmask is " + data["mail"];
+ myPanel.style.color = "green";
+ }, function(error) {
+ myPanel.label = "bitmask is not running";
+ myPanel.style.color = "red";
+ console.log(error);
+ });
+}