clean up logout script
This commit is contained in:
parent
3dee004b2d
commit
dfba93a18d
@ -54,7 +54,7 @@ $("button.add, button.edit").click(function () {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
function logOut(){
|
$("#logout").click(function (){
|
||||||
try {
|
try {
|
||||||
// This is for Firefox
|
// This is for Firefox
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -77,17 +77,7 @@ function logOut(){
|
|||||||
document.location = "http://reset:reset@" + document.location.hostname + document.location.pathname;
|
document.location = "http://reset:reset@" + document.location.hostname + document.location.pathname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
function randomHash() {
|
|
||||||
let chars = "abcdefghijklmnopqrstuvwxyz!@#$%^&*()-+<>ABCDEFGHIJKLMNOP1234567890";
|
|
||||||
let pass = "";
|
|
||||||
for (let x = 0; x < 32; x++) {
|
|
||||||
let i = Math.floor(Math.random() * chars.length);
|
|
||||||
pass += chars.charAt(i);
|
|
||||||
}
|
|
||||||
return pass;
|
|
||||||
}
|
|
||||||
|
|
||||||
$("button.copyToClipboard").click(function () {
|
$("button.copyToClipboard").click(function () {
|
||||||
let id;
|
let id;
|
||||||
@ -103,6 +93,16 @@ $("button.copyToClipboard").click(function () {
|
|||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function randomHash() {
|
||||||
|
let chars = "abcdefghijklmnopqrstuvwxyz!@#$%^&*()-+<>ABCDEFGHIJKLMNOP1234567890";
|
||||||
|
let pass = "";
|
||||||
|
for (let x = 0; x < 32; x++) {
|
||||||
|
let i = Math.floor(Math.random() * chars.length);
|
||||||
|
pass += chars.charAt(i);
|
||||||
|
}
|
||||||
|
return pass;
|
||||||
|
}
|
||||||
|
|
||||||
$("button.generateHash").click(function () {
|
$("button.generateHash").click(function () {
|
||||||
let id;
|
let id;
|
||||||
if ($(this).hasClass('username')) {
|
if ($(this).hasClass('username')) {
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<link rel="icon" href="/static/icons/favicon.ico">
|
<link rel="icon" href="/static/icons/favicon.ico">
|
||||||
|
|
||||||
<title>Narrow Jumbotron Template for Bootstrap</title>
|
<title>TheBBCloud DynDNS</title>
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<a class="nav-link" href="/logs">Logs</a>
|
<a class="nav-link" href="/logs">Logs</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="" onclick="logOut()">Logout</a>
|
<a class="nav-link" href="" id="logout">Logout</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user