Improved add-on bar positioning

main
ElbertF 12 years ago
parent 550133fd07
commit c352f647d3

@ -46,6 +46,8 @@
container(); container();
bindings();
// Version check // Version check
addon.version = addon.version; addon.version = addon.version;
@ -231,11 +233,21 @@
* Move container to address or addon bar * Move container to address or addon bar
*/ */
function container() { function container() {
$('#wappalyzer-container') if ( prefs.getBoolPref('addonBar') ) {
.remove() $('#wappalyzer-container').prependTo($('#wappalyzer-addonbar'));
.prependTo(prefs.getBoolPref('addonBar') ? $('#wappalyzer-addonbar') : $('#urlbar-icons'))
; $('#wappalyzer-addonbar').show();
} else {
$('#wappalyzer-container').prependTo($('#urlbar-icons'));
$('#wappalyzer-addonbar').hide();
}
}
/**
* Bindings
*/
function bindings() {
// Menu items // Menu items
var prefix = '#wappalyzer-menu-'; var prefix = '#wappalyzer-menu-';
@ -268,11 +280,6 @@
} }
}); });
$(prefix + 'donate')
.bind('command', function() {
w.driver.goToURL({ url: w.config.websiteURL + 'donate' })
});
$(prefix + 'feedback') $(prefix + 'feedback')
.bind('command', function() { .bind('command', function() {
w.driver.goToURL({ url: w.config.websiteURL + 'contact' }) w.driver.goToURL({ url: w.config.websiteURL + 'contact' })
@ -292,11 +299,6 @@
.bind('command', function() { .bind('command', function() {
w.driver.goToURL({ url: w.config.twitterURL}) w.driver.goToURL({ url: w.config.twitterURL})
}); });
$(prefix + 'gplus')
.bind('command', function() {
w.driver.goToURL({ url: w.config.gplusURL })
});
} }
w.init(); w.init();