Dep Update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user