個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證A TurboWarp extension for counting, reading, and splitting text by lines.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Use multiline text in TurboWarp projects. Text Lines adds three blocks that can:
• count the lines in some text;
• return one line by its position; and
• replace a Scratch list with every line from the text.
1. Download dist/text-lines.js.
2. In TurboWarp Desktop, open Extensions, choose Custom Extension, and load the downloaded file.
3. Enable Run extension without sandbox when TurboWarp asks.
Text Lines needs to run without the sandbox because its command block writes directly to Scratch lists.檢視完整 README ↗English | 日本語
Use multiline text in TurboWarp projects. Text Lines adds three blocks that can:
dist/text-lines.js.[!IMPORTANT] Text Lines needs to run without the sandbox because its command block writes directly to Scratch lists.
The ready-to-use JavaScript file is committed to this repository. You do not need Node.js to install the extension.
Open Lines to List in TurboWarp Editor · Download the SB3
Allow the custom extension to load, choose Run without sandbox, and click the green flag. The stage shows Line count: 3, Second line: Banana, and a Lines list containing Apple, Banana, and Cherry. Running it again replaces the list. The sample uses all three Text Lines blocks and no other extensions.
The SB3 includes the tested Text Lines JavaScript so TurboWarp can offer the
unsandboxed permission checkbox. Reopening the downloaded SB3 needs no extra JS download.
Edit the first set Input text block to try other text.
Sources: samples/lines-to-list/project.json.
Rebuild with pnpm run samples:build; check committed archives with
pnpm run samples:check. pnpm run pages:build stages documentation, dist/, and
samples under _site/ for GitHub Pages. See sample maintenance.
Start with this text:
Apple
Banana
Cherry
Each block uses the same text in a different way:
flowchart TD
input["Input text<br/>Apple<br/>Banana<br/>Cherry"]
input --> count["number of lines in TEXT<br/>returns: 3"]
input --> line["line 2 of TEXT<br/>returns: Banana"]
input --> list["put lines of TEXT into list items<br/>list: Apple · Banana · Cherry"]
classDef source fill:#ffffff,color:#18212b,stroke:#5b80a5,stroke-width:2px
classDef extension fill:#5b80a5,color:#ffffff,stroke:#3f658a,stroke-width:2px
class input source
class count,line,list extension
The two rounded reporter blocks return a value. The command block changes the selected list immediately.
| Goal | Block | Result for the example above |
|---|---|---|
| Count all lines | number of lines in [TEXT] | 3 |
| Read one line | line [LINE] of [TEXT] with line 2 | Banana |
| Turn the text into list items | put lines of [TEXT] into list [LIST] | Apple, Banana, Cherry |
The exact block definitions are generated from src/block-definitions.json:
number of lines in [TEXT]Returns the number of lines in the supplied text.
| Property | Value |
|---|---|
| Type | Reporter |
| Opcode | lineCount |
TEXT | String, default: first line\nsecond line |
line [LINE] of [TEXT]Returns one line using a one-based line number. Invalid line numbers return an empty string.
| Property | Value |
|---|---|
| Type | Reporter |
| Opcode | lineAt |
TEXT | String, default: first line\nsecond line |
LINE | Number, default: 1 |
put lines of [TEXT] into list [LIST]Replaces the contents of the named Scratch list with the lines of the supplied text.
| Property | Value |
|---|---|
| Type | Command |
| Opcode | writeLinesToList |
TEXT | String, default: first line\nsecond line |
LIST | String, menu: LIST_MENU |
| Situation | What Text Lines does |
|---|---|
| Line numbers | Starts counting at 1, not 0 |
| Invalid line number | Returns an empty string |
| Empty text | Treats it as one empty line |
| Text ending with a line break | Adds an empty final line |
| List command | Replaces all existing items in the selected list |
| Line endings | Accepts LF (\n), CRLF (\r\n), and CR (\r) |
[!WARNING] Copy any list contents you need to keep before running the list command.
For illustrated examples and the Japanese version, open the complete user guide.
Install dependencies with Node.js 24 or later and run every check:
npm install --global corepack@latest
corepack enable
pnpm install --frozen-lockfile
pnpm run check
Useful commands:
| Command | Purpose |
|---|---|
pnpm run dev | Rebuild the extension while files change |
pnpm run test | Run the test suite once |
pnpm run typecheck | Check TypeScript types |
pnpm run build | Build dist/text-lines.js |
pnpm run docs | Regenerate the block reference from the canonical definitions |
When extension source changes, rebuild and commit dist/text-lines.js. When block definitions change, run pnpm run docs before committing.
MPL-2.0 is the forward license source of truth for this repository. The decision is based on the repository license history, Vite extension metadata, and generated bundle header. Published package versions keep the terms they were distributed with; this repository does not revoke earlier grants retroactively.
package.json is the package metadata source of truth. repo-policy.json records the repository
policy, and pnpm run check verifies README, LICENSE, package metadata, generated dist/, and npm
package contents.
SPDX-License-Identifier: MPL-2.0
固定入力の編集範囲・互換性・切戻しについては 固定入力の編集 を参照してください。