Is it able to import and use JQuery on Firefox Web Extension?
I've tried this on manifest.json
"background":{
"scripts": ["views/jquery.js", "startup.js"]
},
"permissions": [
"storage"
],
"browser_action": {
"browser_style": true,
"default_title": "iVi - Personalized your Dashboard",
"default_popup": "views/menu.html",
"default_icon": {
"19": "icons/ivi.png",
"38": "icons/ivi@2x.png"
}
and using `$(document).ready event on menu.HTML like this bellow
<script type="text/javascript">
$(document).ready(function() {
$("#url").val("123");
});
</script>
<div class="panel-form-column2">
<input type="text" id="url" name="url" value="" />
</div>
but it produces error like this bellow :
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src moz-extension:***”). Source: $(document).ready(function() {
And have tried to import JQuery inline on HTML instead on manifest.json
<script type="text/javascript" src="jquery.js"> </script>
<script type="text/javascript">
$(document).ready(function() {
$("#url").val("123");
});
</script>
and still got the same issue.
Any idea?