Cookie Auth

This commit is contained in:
TheEmeraldStarr 2020-10-03 20:43:11 -07:00
parent 4fc085e547
commit 7b2eb1e645
4 changed files with 22 additions and 10 deletions

View file

@ -1,9 +1,25 @@
function $(id) {
return document.getElementById(id);
};
$('nprox').onclick = function nu() {
document.cookie = 'auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;';
}
$('al').onclick = function nu() {
document.cookie = 'auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;';
}
$('pmprox').onclick = function nu() {
document.cookie = 'auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;';
}
$('pdprox').onclick = function nu() {
document.cookie = 'auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;';
}
var host = location.hostname.split('.');
var auth = location.hostname;
if (host.length == 3) {
auth = `${host[1]}.${host[2]}`;
}
function nu() {
document.cookie = 'auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;';
}