PageSourceSearch

https://dystopiatech-nocospace.hf.space/assets/8138-0f9d766b.js

js dystopiatech-nocospace.hf.space collected 2026-10-03 16:51:10 UTC 1,003 bytes, 19 lines download raw bytes

1"use strict";(globalThis.webpackChunknocobase=globalThis.webpackChunknocobase||[]).push([["8138"],{26177(a,e,t){t.r(e),t.d(e,{default:()=>s});let s={contexts:[t(79271).JSBlockRunJSContext],prefix:"sn-jsb-fetch-list",label:"Fetch & render list",description:"Fetch a small list via ctx.api and render basic HTML",locales:{"zh-CN":{label:"拉取并渲染列表",description:"使用 ctx.api 拉取少量数据,并渲染基础 HTML 列表"}},content:`
2// Fetch users
3const { data } = await ctx.request({
4  url: 'users:list',
5  method: 'get',
6  params: { pageSize: 5 },
7});
8const rows = Array.isArray(data?.data) ? data.data : (Array.isArray(data) ? data : []);
9
10// Render as a simple HTML list
11ctx.render([
12  '<div style="padding:12px">',
13  '<h4 style="margin:0 0 8px">' + ctx.t('Users') + '</h4>',
14  '<ul style="margin:0; padding-left:20px">',
15  ...rows.map((r, i) => '<li>#' + (i + 1) + ': ' + String((r && (r.nickname ?? r.username ?? r.id)) ?? '') + '</li>'),
16  '</ul>',
17  '</div>'
18].join(''));
19`}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.