mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix online status checks
This commit is contained in:
@ -49,7 +49,9 @@ const observerConfig = { childList: true, subtree: true };
|
|||||||
|
|
||||||
const observer = new MutationObserver(function (mutations) {
|
const observer = new MutationObserver(function (mutations) {
|
||||||
mutations.forEach(function (mutation) {
|
mutations.forEach(function (mutation) {
|
||||||
if (mutation.target.id === "online_status_text2") {
|
if (mutation.target.id === "online_status_text2" ||
|
||||||
|
mutation.target.id === "online_status_text3" ||
|
||||||
|
mutation.target.classList.contains("online_status_text4")) {
|
||||||
RA_checkOnlineStatus();
|
RA_checkOnlineStatus();
|
||||||
} else if (mutation.target.parentNode === SelectedCharacterTab) {
|
} else if (mutation.target.parentNode === SelectedCharacterTab) {
|
||||||
setTimeout(RA_CountCharTokens, 200);
|
setTimeout(RA_CountCharTokens, 200);
|
||||||
@ -260,7 +262,8 @@ function isUrlOrAPIKey(string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("document").ready(function () {
|
$("document").ready(function () {
|
||||||
|
// initial status check
|
||||||
|
setTimeout(RA_checkOnlineStatus, 100);
|
||||||
|
|
||||||
// read the state of AutoConnect and AutoLoadChat.
|
// read the state of AutoConnect and AutoLoadChat.
|
||||||
$(AutoConnectCheckbox).prop("checked", LoadLocalBool("AutoConnectEnabled"));
|
$(AutoConnectCheckbox).prop("checked", LoadLocalBool("AutoConnectEnabled"));
|
||||||
|
Reference in New Issue
Block a user