Open lbshopping opened 1 year ago
Can you please explain what are you trying to achieve here?
Can you please explain what are you trying to achieve here?
Want to use jQuery with it
Why not just add jquery
files to content_scripts
?
It will not work, so I have to add it using npm or yarn
It should work as expected.
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["/libs/jquery-3.2.1.min.js"] ,
"run_at": "document_end"
}
]
Or if at runtime:
chrome.browserAction.onClicked.addListener(function (tab) {
chrome.tabs.executeScript({
file: "/libs/jquery-3.2.1.min.js"
}, function() {
chrome.tabs.executeScript({
file: 'work.js'
});
});
});
In both cases it's not running, I get the following error:
This error is related to backend script.
There is no backend script
you are trying to load: bg-supa.js
. Read the error message, please
yes, it's loaded from the manifest.json
if you check it and it runs without any problem. But once I add jQuery in any way whether through Yarn, NPM or manually, the problem shows.
Hi, When I am using jquery with this code, the plugin doesn't run. It gives a code 3 error.
I've tried adding jQuery through npm and importing it inside
content.js
like:into content.js, the plugin runs, but jQuery doesn't run
Any clues would be highly appreciated.