How to inject a content_scripts file into script tag #908
-
Hi there, "content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"~/inject.ts"
],
"run_at": "document_start",
"all_frames": true
}
], I want to inject that file in the script tag like- const script = document.createElement('script');
script.type = 'text/javascript';
script.src = chrome.runtime.getURL('inject.ts');
(document.head).prepend(script); This is not found in How to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
RatulHasan
Mar 13, 2024
Replies: 1 comment
-
This was answered by this comment. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
RatulHasan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was answered by this comment.
Thanks @louisgv