- ajax(
- "/observedgames",
- "GET",
- {
- data: {
- uid: this.st.user.id,
- cursor: this.cursor
- },
- success: (response) => {
- const L = response.games.length;
- if (L > 0) {
- this.cursor = response.games[L - 1].created;
- if (this.games.length == 0 && this.gdisplay == "live") {
- document
- .getElementById("btnGcorr")
- .classList.add("somethingnew");
- }
- }
- this.games = this.games.concat(
- response.games.map(g => {
- const vname = this.getVname(g.vid);
- return Object.assign(
- {},
- g,
- {
- type: "corr",
- vname: vname
- }
- );
- })
- );
- }
- }
- );