Looks like to me that lines 59-64 should actually be in the attachTabWorker function. You only need to save the workers for the panel to current worker communication.
I'd connect your port communication like this:
function attachTabWorker(tab) {
// Attach and store
var tabWorker = tabWorkers[tab.id] = tab.attach({
contentScriptFile: [data.url("clear.js"),data.url("jquery.js")]
});
// Clean up
tabWorker.on("detach", function() {
if (getTabWorker(tab) === tabWorker) {
delete tabWorkers[tab.id];
}
});
tabWorker.port.on('hiderOn',function(tag){
panel1.port.emit('hiderOn', tag);
});
tabWorker.port.on('hiderOff',function(tag){
panel1.port.emit('hiderOff', tag);
});
}
Otherwise you're only getting the port communication link setup for the activeTab when it's first run instead of for every tab like I believe you want. The code getActiveTabWorker().port.on
... runs once at startup of the add-on which only creates a listener for the activeTab and not all tabs. I hope that makes sense.