forked from .cyb/cyberman
Update 'public/js/admin_domains.js'
This commit is contained in:
parent
563c48d0da
commit
bf25528424
|
@ -1,14 +1,15 @@
|
||||||
function updateOwnerEmail() {
|
function showOwnerEmail(in_name) {
|
||||||
var name = this.domainName;
|
let name = in_name;
|
||||||
document.getElementById("owneremail-"+name).innerHTML = this.responseText;
|
if (!document.getElementById('owneremail-' + name)) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
function showOwnerEmail(name) {
|
document.getElementById('owneremail-' + name).innerHTML = 'Loading...';
|
||||||
document.getElementById("owneremail-"+name).innerHTML = "Loading...";
|
fetch('/api/get_owner_email?name=' + encodeURIComponent(name), {
|
||||||
|
method: 'GET',
|
||||||
var req = new XMLHttpRequest();
|
mode: 'cors'
|
||||||
req.domainName = name;
|
}).then(g => g.text()).then(g => {
|
||||||
req.addEventListener("load", updateOwnerEmail);
|
document.getElementById('owneremail-' + name).innerHTML = g;
|
||||||
req.open("GET", "/api/get_owner_email?name="+encodeURIComponent(name));
|
}).catch((e) => {
|
||||||
req.send();
|
console.log('server error', e);
|
||||||
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue