Permalink
Browse files

integrate simulated infobars into the gombot addon

  • Loading branch information...
1 parent 6b94a9c commit ea7ca0ee60e24bd22dd9eeb499b5f26116b68a5b @lloyd lloyd committed Nov 21, 2012
Showing with 35 additions and 3 deletions.
  1. +3 −0 .gitmodules
  2. +2 −1 background.html
  3. +17 −0 data/remember_password_infobar.html
  4. +3 −0 data/remember_password_infobar.js
  5. +1 −0 infobar
  6. +7 −1 main.js
  7. +2 −1 manifest.json
View
@@ -1,3 +1,6 @@
[submodule "server"]
path = server
url = git://github.com/mozilla/gombot
+[submodule "infobar"]
+ path = infobar
+ url = git://github.com/lloyd/simulated_infobars
View
@@ -2,6 +2,7 @@
<script src="lib/jquery.js"></script>
<script src="lib/jsuri.js"></script>
<script src="lib/socket.io.js"></script>
+<script src="infobar/manager.js"></script>
<script src="util.js"></script>
<script src="pin_ui.js"></script>
<script src="pin_ui_incontent.js"></script>
@@ -14,4 +15,4 @@
<body>
<!-- Invisible <textarea> used to copy data onto the clipboard -->
<textarea id="clipboard-sandbox"></textarea>
-</body>
+</body>
@@ -0,0 +1,17 @@
+<html>
+<head>
+<style>
+ body {
+ background-color: red;
+ height: 40px;
+ }
+</style>
+</head>
+<body>
+ This is my infobar. <button>ok</button>
+ <!-- gives you window.CompleteInfobar() which you call with
+ a javascript object to end your infobar -->
+ <script src="/infobar/api.js"></script>
+ <script src="remember_password_infobar.js"></script>
+</body>
+</html>
@@ -0,0 +1,3 @@
+document.querySelector('button').onclick = function() {
+ CompleteInfobar("all done");
+};
Submodule infobar added at 0e3bb2
View
@@ -61,6 +61,12 @@ var messageHandlers = {
}
}
// Prompt the user to save the login
+ InfobarManager.run({
+ path: "data/remember_password_infobar.html"
+ }, function(err, response) {
+ console.log(err, response);
+ });
+
displayNotification({
notify: true,
tabId: tabID,
@@ -171,4 +177,4 @@ function validatePIN(_pin) {
// If there's no PIN set, accept.
if (!loginsLock || !loginsLock.pin) return true;
return _pin == loginsLock.pin;
-}
+}
View
@@ -28,6 +28,7 @@
"icons/small.png",
"data/pin_entry.html",
"data/pin_entry.js",
- "data/css/pin_entry.css"
+ "data/css/pin_entry.css",
+ "data/remember_password_infobar.html"
]
}

0 comments on commit ea7ca0e

Please sign in to comment.