Ok so you're not getting a security error. The reuest goes through succesfully:
http://dazzlepod.com/ip/stackoverflow.com.json
GET /ip/stackoverflow.com.json HTTP/1.1
Host: dazzlepod.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Origin: null
Connection: keep-alive
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 24 Mar 2014 00:36:37 GMT
Content-Type: application/json
Content-Length: 198
Connection: keep-alive
Content-Encoding: gzip
Expires: Wed, 23 Apr 2014 00:36:36 GMT
Vary: Accept-Encoding
Last-Modified: Mon, 24 Mar 2014 00:36:36 GMT
Cache-Control: max-age=2592000
X-Frame-Options: DENY
i wonder if that x-frame-options: deny has anything to do with whats going on.
anyways you get that ns failur error because of this reason:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ click_handler.js:31
so you have to set third argument on .open to true.
but then still im getting a bunch of no responseXML or responeText or event responeType or respone.
Its weird.
I just changed the code in the click_handler.js and also its weird but console.log doesnt work from here, at least in aurora.
function getDomainInfo(url) {
var a = document.createElement('a');
a.href = url;
var domain = a.hostname;
var requestURL = "http://dazzlepod.com/ip/"+domain+".json";
alert(requestURL);
return httpGet(requestURL);
}
function httpGet(theUrl)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onload = function() {
alert('onload done ' + '\n' + xmlhttp.readyState + '\n' + xmlhttp.status + '\n' + xmlhttp.responseText + '\n' + xmlhttp.response + '\n' + xmlhttp.responseType + '\n' + xmlhttp.responseXML);
alert('onload done ' + '\n' + this.readyState + '\n' + this.status + '\n' + this.responseText + '\n' + this.response + '\n' + this.responseType + '\n' + this.responseXML);
}
xmlhttp.onreadystatechange=function()
{
alert('onreadystatechange' + '\n' + xmlhttp.readyState + '\n' + xmlhttp.status + '\n' + xmlhttp.responseText + '\n' + xmlhttp.response + '\n' + xmlhttp.responseType + '\n' + xmlhttp.responseXML);
alert('onreadystatechange this ' + '\n' + this.readyState + '\n' + this.status + '\n' + this.responseText + '\n' + this.response + '\n' + this.responseType + '\n' + this.responseXML);
if (xmlhttp.readyState==4)
{
alert('onreadystatechange READYSTE==4' + '\n' + xmlhttp.readyState + '\n' + xmlhttp.status + '\n' + xmlhttp.responseText + '\n' + xmlhttp.response + '\n' + xmlhttp.responseType + '\n' + xmlhttp.responseXML);
return xmlhttp.responseText;
}
}
xmlhttp.open("GET", theUrl, true );
alert('xmlhttp = ', xmlhttp);
xmlhttp.send();
}
var check = self.port.on("clicked", function(url) {
alert(window.location);
var json = getDomainInfo(url);
});