From 4960d5d8e621177b49a11a8ccd4028c20552f1b7 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 10 Sep 2021 06:35:43 +0200 Subject: [PATCH] gf --- files/assets/js/general16.js | 6 +++++- files/templates/header.html | 4 ++-- files/templates/userpage_private.html | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/files/assets/js/general16.js b/files/assets/js/general16.js index e611d08f5..0d1edae57 100644 --- a/files/assets/js/general16.js +++ b/files/assets/js/general16.js @@ -311,7 +311,7 @@ function post(url, callback, errortext) { xhr.send(form); }; -function post_toast(url, reload, data) { +function post_toast(url, reload, callback, data) { var xhr = new XMLHttpRequest(); xhr.open("POST", url, true); var form = new FormData() @@ -337,6 +337,10 @@ function post_toast(url, reload, data) { } if (reload == 1) {window.location.reload(true)} + else { + try {callback(xhr)} + catch(e) {} + } return true } else if (xhr.status >= 300 && xhr.status < 400) { diff --git a/files/templates/header.html b/files/templates/header.html index 6955dd13b..882581002 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -130,7 +130,7 @@
- Log out + Log out
@@ -190,7 +190,7 @@ {% else %}