I'm trying to make something similar to the picture below.
http://img696.imageshack.us/img696/8844/testi.jpg
Unfortunately, I can't seem to get it to work within the extension. I get an error stating there was "Error loading the document". The screenshot above was done using a locally made html with the iBox javascript. Is there any other javascript library that would permit me to load my popup html the same way it does with an icon in the bar?
This is how the code was implemented locally to open the popup:
document.addEventListener('keydown', function(e){
if (e.keyCode == 81 && e.altKey && !e.shiftKey && e.ctrlKey) {
iBox.showURL('search.html');
}
}, false);
This is the function in iBox library:
showURL: function(url, title, params) {
showInit(title, params, function() {
for (var i=0; i<_pub.plugins.list.length; i++) {
var plugin = _pub.plugins.list[i];
if (plugin.match(url)) {
active.plugin = plugin;
plugin.render(url, active.params);
break;
}}});}
This is the xmlhttp request:
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http = new XMLHttpRequest();
if (http.overrideMimeType) {
// set type accordingly to anticipated content type
http.overrideMimeType('text/html');
}
}