" +e.name+ ", " +e.hub.name+ ".";
printStatus(output);
addDestBtn(loc);
}, 0);
});
} catch (e) {
printStatus(e, true);
}
}
function askZog(term) {
var url = "http://zoggish.appspot.com/profiles/me";
if (term) {
term = term.split(" ").join("-");
url = "http://zoggish.appspot.com/find-" + term;
}
try {
GM_xmlhttpRequest({
method: "GET",
url: url,
onload: function(response) {
var tmpDiv = document.createElement("div");
tmpDiv.innerHTML = response.responseText;
var title = tmpDiv.getElementsByTagName("title")[0].innerHTML;
if (title.indexOf("Request for Permission") != -1) {
if (term) {
alert("..." +url+ "..." +tmpDiv.innerHTML);
printStatus("You're not logged into Inventory of Ur. Go log in, or there will be no data for you!", true);
} else {
printStatus("You need to be logged into Inventory of Ur to search for features. You can search for your friends without logging in.");
}
return;
} else if (!term)
return;
if (term && title.indexOf("Where to find") < 0) {
printStatus("Couldn't get location data from " +url+ ".", true);
return;
}
var content = response.responseText.substring(response.responseText.indexOf(""),
response.responseText.indexOf("