clean up logout script
This commit is contained in:
+12
-12
@@ -54,7 +54,7 @@ $("button.add, button.edit").click(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
function logOut(){
|
||||
$("#logout").click(function (){
|
||||
try {
|
||||
// This is for Firefox
|
||||
$.ajax({
|
||||
@@ -77,17 +77,7 @@ function logOut(){
|
||||
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 () {
|
||||
let id;
|
||||
@@ -103,6 +93,16 @@ $("button.copyToClipboard").click(function () {
|
||||
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 () {
|
||||
let id;
|
||||
if ($(this).hasClass('username')) {
|
||||
|
||||
Reference in New Issue
Block a user