Firefox Addon - Accessing pre-loaded content script from ActionButton
I am attaching content script to every tab on my firefox add-on. And if user clicks on ActionButton (top right icon on browser) I am trying to access content script handler function, but it does not work. I am using walkthroughs from Content Scripts but still could not make it work. Am I doing something wrong? Please see code below the TODO marked areas are not working; // main.js tabs.on('ready', function (tab) { var worker = tab.attach({ include: "*", //contentScript: 'window.alert("Page matches ruleset");', contentStyleFile: [data.url("scripts/myTestContent1.js")] }); worker.port.on(