mirror of
https://github.com/casjaysdevdocker/bind
synced 2025-09-19 03:57:46 -04:00
🦈🏠🐜❗ Initial Commit ❗🐜🦈🏠
This commit is contained in:
6
rootfs/usr/share/httpd/default/js/errorpages/homepage.js
Normal file
6
rootfs/usr/share/httpd/default/js/errorpages/homepage.js
Normal file
@@ -0,0 +1,6 @@
|
||||
function homepage() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let currentSite = window.location.hostname;
|
||||
window.location = proto + '//' + currentSite + ':' + port;
|
||||
}
|
7
rootfs/usr/share/httpd/default/js/errorpages/isup.js
Normal file
7
rootfs/usr/share/httpd/default/js/errorpages/isup.js
Normal file
@@ -0,0 +1,7 @@
|
||||
function isupme() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let currentSite = window.location.hostname;
|
||||
fullurllocation = proto + '//' + currentSite + ':' + port;
|
||||
window.location = 'http://isup.me/' + fullurllocation;
|
||||
}
|
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;
|
||||
}
|
26
rootfs/usr/share/httpd/default/js/errorpages/loadlocation.js
Normal file
26
rootfs/usr/share/httpd/default/js/errorpages/loadlocation.js
Normal file
@@ -0,0 +1,26 @@
|
||||
function loadLocation(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-location';
|
||||
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;">Return to homepage</div>';
|
||||
display.innerHTML = message;
|
||||
return full_url;
|
||||
}
|
20
rootfs/usr/share/httpd/default/js/errorpages/scale.fix.js
Normal file
20
rootfs/usr/share/httpd/default/js/errorpages/scale.fix.js
Normal file
@@ -0,0 +1,20 @@
|
||||
var metas = document.getElementsByTagName('meta');
|
||||
var i;
|
||||
if (navigator.userAgent.match(/iPhone/i)) {
|
||||
for (i = 0; i < metas.length; i++) {
|
||||
if (metas[i].name == 'viewport') {
|
||||
metas[i].content =
|
||||
'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
|
||||
}
|
||||
}
|
||||
document.addEventListener('gesturestart', gestureStart, false);
|
||||
}
|
||||
|
||||
function gestureStart() {
|
||||
for (i = 0; i < metas.length; i++) {
|
||||
if (metas[i].name == 'viewport') {
|
||||
metas[i].content =
|
||||
'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user