ahora script js agregar desde background.js
chrome.scripting.executeScript({ target: {tabId: tabID, allFrames: true}, files: ['script.js'] })guión.js
var jsURL = chrome.runtime.getURL("jquery/jquery.min.js"); var jq = document.createElement('script'); jq.src = jsURL; document.head.prepend(jq); window.onload = function(){ var t = setTimeout(function(){ $.noConflict(true); $("p").append(" <b>Appended text</b>."); }, 5000); }manifiesto v3
"web_accessible_resources": [{ "resources": ["jquery/jquery.min.js", "css/style.css" ], "matches": ["<all_urls>"], "extension_ids": [] }],Error de referencia no capturado: $ no está definido
¿Cómo inyectar jquery en el manifiesto 3?
Qué tal esto.
ventana emergente.html
<script src="jquery/jquery.min.js"/> <script src="script.js"/>