since my Chrome Extension didn't work under Mac I broke the code down and found the problem:
background.js
chrome.browserAction.onClicked.addListener(function(tab){
alert("Goin to");
chrome.tabs.executeScript(tab.id, {file: "script.js"});
});
script.js
$('#Hoster_30').trigger('click');
alert("Clicked");
jQuery is loaded and both alerts are shown, but the click event isn't triggered. It works fine when I directly enter the trigger in the js console on the page and under Windows it also works in the add on.
Here my manifest.json
{
"name": "MacAddon",
"version": "0.1",
"permissions": ["tabs", "http://*/", "https://*/"],
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_title": "MacAddon"
},
"content_scripts": [
{
"matches": ["http://*.kinox.to/*", "http://*.streamcloud.eu/*"],
"js": ["jquery.js"]
}
]
}