put URL construction into a function so it can be separated out if we ever...

put URL construction into a function so it can be separated out if we ever want to support bootstrapping
parent c6c380e6
......@@ -95,13 +95,18 @@ function doQuery() {
url = 'json://' + object;
} else {
url = 'https://rdap.org/' + typeval + '/' + object;
url = getRDAPURL(typeval, object);
}
sendQuery(url);
}
// construct an RDAP URL for the given object
function getRDAPURL(typeval, object) {
return 'https://rdap.org/' + typeval + '/' + object;
}
// given a URL, injects that URL into the query input,
// and initiates an RDAP query
function runQuery(url) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment