After downloading the js for DataTables, I attempted to load it onto my Firefox extension but encountered a Content Security Policy block:
Content Security Policy: The page’s settings blocked the loading of a resource at self (“default-src moz-extension://27d54fdf-40f3-4919-9314-f0f8b4715ef6”). Source: onfocusin attribute on DIV element. options.html
Content Security Policy: The page’s settings blocked the loading of a resource at self (“default-src moz-extension://27d54fdf-40f3-4919-9314-f0f8b4715ef6”). Source: $( document ).ready(functi....
I have added the Content Security Policy in my manifest.json file:
"content_security_policy": "default-src 'self'"
The scripts included in the head section are:
<script src="jquery-1.12.4.js"></script>
<script src="jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="jquery.dataTables.min.css">
And this is my script on the options page:
<script type="text/javascript">
$( document ).ready(function() {
console.log( "ready!" );
$('#example').DataTable();
});
</script>
If anyone has any insights or solutions to offer, please let me know!