bind/rootfs/usr/share/httpd/default/js/errorpages/homepage.js
casjay ddfe8bf8a7
All checks were successful
release-tag / release-image (push) Successful in 3m18s
🗃️ Committing everything that changed 🗃️
rootfs/usr/share/httpd/default/js/errorpages/homepage.js
2024-09-02 19:25:21 -04:00

17 lines
430 B
JavaScript

function homepage(getURI) {
let baseURI = getURI;
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 (!base) base = '/';
if (!port)
if (proto == 'https:') {
port = 443;
} else {
port = 80;
}
window.location = proto + '//' + url + ':' + port + base;
}