mirror of
				https://github.com/dockersrc/scripts
				synced 2025-11-03 19:02:11 -05:00 
			
		
		
		
	🗃️ Committing everything that changed 🗃️
htdocs/www/js/errorpages/homepage.js
This commit is contained in:
		@@ -1,6 +1,16 @@
 | 
			
		||||
function homepage() {
 | 
			
		||||
  let proto = location.protocol;
 | 
			
		||||
function homepage(getURI) {
 | 
			
		||||
  let baseURI = getURI;
 | 
			
		||||
  let port = location.port;
 | 
			
		||||
  let currentSite = window.location.hostname;
 | 
			
		||||
  window.location = proto + '//' + currentSite + ':' + 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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user