¿Cómo conectar las bibliotecas jQuery a la extensión de Google?
manifest.json
{ "name": "SomeName", "description": "SomeDesc", "version": "1.0", "manifest_version": 3, "content_scripts": [ { "matches":["<all_urls>"], "js": [ "lib/jQuery.min.js", "lib/ion.rangeSlider.min.js", "main.js" ] } ], "action":{ "default_popup": "index.html", "default_icon": "favicon.ico" }, "permissions": ["storage", "activeTab", "scripting"] } index.html
<html> <head> <link rel="stylesheet" href="/style/style.css"> <!--Plugin CSS file with desired skin--> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css"/> </head> <body> <input type="text" class="js-range-slider" name="my_range" value="" /> <script src="main.js"></script> </body> </html> main.js
$(".js-range-slider").ionRangeSlider(); como resultado, da un error, Uncaught ReferenceError: $ is not defined , lo que significa que la biblioteca no estaba conectada.