From d6bed2673b392e0f28334b7b088de7c9deef9226 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Mon, 29 May 2023 13:09:36 +0300 Subject: [PATCH] More clear CSRF notification --- public/script.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/script.js b/public/script.js index 0ea1e79d3..8058ffa7b 100644 --- a/public/script.js +++ b/public/script.js @@ -423,13 +423,9 @@ export const event_types = { export const eventSource = new EventEmitter(); -// refresh token $(document).ajaxError(function myErrorHandler(_, xhr) { if (xhr.status == 403) { - $.get("/csrf-token").then((data) => { - console.log('refreshed csrf token'); - token = data.token; - }); + toastr.warning("doubleCsrf errors in console are NORMAL in this case. Just reload the page or close this tab.", "Looks like you've opened SillyTavern in another browser tab", { timeOut: 0, extendedTimeOut: 0, preventDuplicates: true }); } });