MCPcopy
hub / github.com/ocsjs/ocsjs / methods

Function methods

packages/scripts/src/projects/background.ts:403–412  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 2

requestFunction · 0.90
getRemotePageMethod · 0.80

Tested by

no test coverage detected