Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClick: async () => {
const res = await this.client.message("/options/open");
console.log(res);
},
},
{
title: "編成キャプチャ",
icon: "grip-vertical" as IconName,
onClick: async () => {
const res = await this.client.message("/deckcapture/open");
console.log(res);
},
}
];
private client: any /* FIXME: Client */ = new Client(chrome.runtime, false);
}
constructor(props) {
super(props);
this.state = {
kind: "request",
// controller: "onCombinedBattleResulted",
controller: "onDeck",
params: {__this:{}},
raw: JSON.stringify({__this:{}}, null, 2),
error: null,
output: "",
};
this.client = new Client(chrome.runtime);
}
onParamsChanged(ev) {
constructor(props) {
super(props);
const url = new URL(location.href);
this.state = {
// プレー画面のキャプチャストリームURL
capturedBlobURL: url.searchParams.get("src"),
// STARTからSTOPまでの動画URL
recordedBlobURL: null,
};
this.client = new Client(chrome.runtime);
window.onbeforeunload = () => {
this.client.message("/stream/revoke");
return;
};
this.drawerWidth = 180;
}
startRecording() {
updateFrame() {
// TODO: バリデーションちゃんとしよう
if (this.state.frame.alias.trim() == "") return window.alert("名前は必須です");
const client = new Client(chrome.runtime);
client.message("/frame/update", {frame: this.state.frame.regulate()}).then(() => location.reload());
}
}
constructor() {
super();
this.client = new Client(chrome.runtime, false);
this.client.message("/debug/availables", (res) => {
this.controllers.message = res.data.controllers.message;
this.controllers.request = res.data.controllers.request;
this.$forceUpdate(); // FIXME:
});
}
import React, { Component, Fragment } from "react";
import {Client} from "chomex";
import Frame from "../../Models/Frame";
export default class LaunchTrigger extends Component<{}, {frames: Frame[], selected: Frame}> {
private client: Client = new Client(chrome.runtime);
constructor(props) {
super(props);
this.state = {
frames: Frame.list(),
selected: Frame.latest(),
};
}
render() {
return (
<div>
<div>
<div>
<select> this.onSelect(ev)}
className="form-select"
style={{appearance: "none"}}</select></div></div></div>
constructor() {
super();
this.client = new chomex.Client(chrome.runtime);
this.frames = Frame.list();
this.selected = Frame.latest();
}
import React, { Component } from "react";
import { Client } from "chomex";
import TempStorage from "../../../Services/TempStorage";
export default class DamageSnapshot extends Component<{}, {
count: number;
text?: string;
uris: string[];
}> {
private client: any = new Client(chrome.runtime);
private observe: number;
private record: number;
private key: string;
constructor(props) {
super(props);
const search = new URLSearchParams(location.search);
const count = parseInt(search.get("count") || "1");
const text = search.get("text");
this.key = search.get("key");
this.observe = setInterval(() => this.renderImage(), 100);
this.record = setInterval(() => this.recordFrame(), 2000);
this.state = {count, text, uris: []};
}
render() {
const {text, uris} = this.state;
constructor(props) {
super(props);
this.params = (new URL(location.href)).searchParams;
window.document.querySelector("title").innerHTML = `${this.title()}タイマー手動登録`;
this.queue = {
type: this.params.get("type"),
identifier: this.params.get("identifier"),
};
this.client = new Client(chrome.runtime);
}
title() {