This is a little library that you can include in a chrome extension to render infobars. For your pleasure, this is itself an example chrome extension that demonstrates how to use itself (very meta).
git submodule add git://github.com/lloyd/simulated_infobars infobar
"background": {
"scripts": [
"infobar/manager.js",
... your other background scripts ...
]
}
my_infobar.html
:
<html>
<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="my_infobar.js"></script>
</body>
</html>
my_infobar.js
:
document.querySelector('button').onclick = function() {
CompleteInfobar("all done");
};
"web_accessible_resources": [
"my_infobar.html",
... your other web accessible resources ...
]
InfobarManager.run({
path: "/my_infobar.html",
height: "50px"
}, function(err, response) {
console.log(err, response);
});