I have a little problem with my Chrome extension. My manifest.json:
[..]
"background": {
"page": "background.html",
"persistent": false
},
"content_scripts": [
{
"matches": ["http://*/", "https://*/"],
"js": [
"js/jquery-3.2.1.js"
]
}
],
"permissions": [
"unlimitedStorage",
"tabs",
"activeTab",
"browsingData",
"notifications",
"webNavigation",
"http://*/",
"https://*/"
]
And in one of the JavaScript file I have something like that:
chrome.tabs.executeScript( tabId, {
code:"$('#user').attr('value','test');"
});
Why doesn't it work? When I'll replace this with:
chrome.tabs.executeScript( tabId, {
code:"document.getElementById('user').value='test';"
});
Everything is OK. Why this jQuery doesn't work?