Dep Update

This commit is contained in:
2024-10-14 10:59:19 +02:00
parent d107b1a49f
commit 1cbde09ac6
10 changed files with 2393 additions and 3018 deletions

View File

@@ -1,6 +1,6 @@
import './status.css';
import { axios } from './utils';
import { ZcStatus } from './zc-status';
import GM_fetch from "@trim21/gm-fetch";
declare function waitForKeyElements(selectorOrFunction: any, callback: any, waitOnce: boolean): any;
@@ -26,10 +26,9 @@ export class Status {
private async checkStatus() {
if (this._enabled) {
try {
var response = await axios.get<ZcStatus>('http://cpatapi.cpsrvweb2016.cp-austria.at/availability/' + encodeURIComponent(this._user));
var response = await GM_fetch('http://cpatapi.cpsrvweb2016.cp-austria.at/availability/' + encodeURIComponent(this._user));
if (response.status == 200) {
var status = response.data;
var status = await response.json() as ZcStatus;
if (this._currentStatus !== status.loggedIn) {
this._currentStatus = status.loggedIn;
console.log('New status, loggedIn', this._currentStatus);