I am trying to extract the source code of an external website to create a chrome extension.
in the popup.html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script>
<script>
$(document).ready(function()
{
$.get("http://www.espncricinfo.com/",function(data){
$('body').text(data);
});
});
This is to extract the html source code. I added the website in my permissions tag in the manifest file. But there is no output coming. Could any one let me know where I am going wrong
Don’t use build-in script in popup.html, instead you have to use external js file(s), see Content Security Policy.
Something like this:
If it doesn’t work still, you should copy your manifest file here.