mirror of
https://github.com/casjaysdevdocker/bind
synced 2025-09-19 21:57:40 -04:00
🦈🏠🐜❗ Initial Commit ❗🐜🦈🏠
This commit is contained in:
26
rootfs/usr/share/httpd/default/js/errorpages/loaddomain.js
Normal file
26
rootfs/usr/share/httpd/default/js/errorpages/loaddomain.js
Normal file
@@ -0,0 +1,26 @@
|
||||
function loadDomain(getURI, getID, getMessage) {
|
||||
let id = getID;
|
||||
let baseURI = getURI;
|
||||
let message = getMessage;
|
||||
let port = location.port;
|
||||
let url = location.hostname;
|
||||
let proto = location.protocol;
|
||||
let baseURL = baseURI || location.pathname;
|
||||
let base = baseURL.slice(0, baseURL.lastIndexOf('/'));
|
||||
if (!id) id = 'display-domain';
|
||||
if (!base) base = '/';
|
||||
if (!port)
|
||||
if (proto == 'https:') {
|
||||
port = 443;
|
||||
} else {
|
||||
port = 80;
|
||||
}
|
||||
console.log('Base: ' + base);
|
||||
full_url = proto + '//' + url + ':' + port + base;
|
||||
display = document.getElementById(id);
|
||||
display.href = full_url;
|
||||
display.title = full_url;
|
||||
message = message || '<div style="font-size:1.3rem;">' + full_url + '</div>';
|
||||
display.innerHTML = message;
|
||||
return full_url;
|
||||
}
|
Reference in New Issue
Block a user