()
| 401 | } |
| 402 | }, |
| 403 | methods() { |
| 404 | return { |
| 405 | getLastVersion: async () => { |
| 406 | return (await request('https://cdn.ocsjs.com/ocs-version.json?t=' + Date.now(), { |
| 407 | method: 'get', |
| 408 | type: 'GM_xmlhttpRequest' |
| 409 | })) as { 'last-version': string; resource: Record<string, string>; notes: string[] }; |
| 410 | } |
| 411 | }; |
| 412 | }, |
| 413 | async onrender({ panel }) { |
| 414 | const version = await this.methods.getLastVersion(); |
| 415 | const infos = $gm.getInfos(); |
nothing calls this directly
no test coverage detected