Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as scrapboxUserscriptStd from "https://raw.githubusercontent.com/takker99/scrapbox-userscript-std/main/mod.ts";

§Classes

Cursor

カーソル操作クラス

Selection
Socket
UnexpectedResponseError

想定されない応答が帰ってきたときに投げる例外

§Variables

caret

現在のカーソルと選択範囲の位置情報を取得する

click

Emulate click event sequences

computeLine
connect

websocketに(再)接続する

cookie

HTTP headerのCookieに入れる文字列を作る

cursor
cursorLine
deleteLines
deletePage

指定したページを削除する

disconnect

websocketを切断する

downBlocks
downLines
editor
encodeTitleURI

titleをURIで使える形式にEncodeする

exportPages

projectの全ページをエクスポートする

extractCodeFiles

scrapbox.Page.linesからcode blocksを取り出す

fetchApiCache

指定したAPIのcacheの更新を依頼する

findLatestCache

scrapbox.ioが管理しているcache storageから、最新のresponseを取得する

focusEnd deprecated
getBaseLine
getCharDOM
getCodeBlock

指定したコードブロック中のテキストを取得する

getCodeBlocks

他のページ(または取得済みの行データ)のコードブロックを全て取得する

getCSRFToken

CSRF tokenを取得する

getDOMFromPoint
getExternalLink
getFormula
getGyazoToken

Gyazo OAuth uploadで使うaccess tokenを取得する

getHeadCharDOM
getHeadLineDOM
getIndentCount
getIndentLineCount

指定した行の配下にある行の数を返す

getIndex
getInternalLink
getLine
getLineCount
getLineDOM
getLineId

Get the line id from value

getLineNo

Get the line number from value

getLines
getLink
getLinks

指定したprojectのリンクデータを取得する

getNextLine
getPage

指定したページのJSONデータを取得する

getPrevLine
getProfile

get user profile

getProject

get the project information

getSnapshots

get page snapshots

getTable

指定したテーブルをCSV形式で得る

getTailCharDOM
getTailLineDOM
getText
getTweetInfo

指定したTweetの情報を取得する

getWebPageTitle

指定したURLのweb pageのtitleをscrapboxのserver経由で取得する

goChar

任意の文字に移動する

goEnd

行末に移動する

goEndWithoutBlank

最後の非空白文字に移動する

goHead

行頭に移動する

goHeadLine

最初の行の行頭に移動する

goHeadWithoutBlank

インデントを除いた行頭に移動する

goLastLine

最後の行の行末に移動する

goLine

任意の行の行末に移動する

grid
holdDown

Emulate long tap event sequence

importPages

projectにページをインポートする

indentBlocks
indentLines
insertIcon
insertLine
insertText
insertTimestamp
isCharDOM
isLineDOM
lines
listPages

指定したprojectのページを一覧する

listProjects

list the projects' information

makeError

失敗した要求からエラー情報を取り出す

makeSocket

新しいsocketを作る

moveBlocks
moveDown

カーソルを下に動かす

moveLeft

カーソルを左に動かす

moveLines
moveLinesBefore
moveRight

カーソルを右に動かす

moveUp

カーソルを上に動かす

open

ページを開く

openInTheSameTab

同じタブでページを開く

outdentBlocks
outdentLines
pageCustomButtons
pageEditButtons
pageEditMenu
pageInfoMenu
pageMenu
parseAbsoluteLink

scrapbox-parserで解析した外部リンク記法を、埋め込み形式ごとに細かく解析する

patch

ページ全体を書き換える

pin

指定したページをピン留めする

pinNumber
popupMenu
prefetch

prefetchを実行する

press

JavaScriptから任意のキー押下eventを発行する

pushPageTransition

ページ遷移状態を登録し、次回のページ遷移時にリンク先へスクロールする

randomJumpButton
readLinks

指定したprojectの全てのリンクデータを取得し、一つづつ返す

readLinksBulk

指定したprojectの全てのリンクデータを取得する

readSnapshots

指定したページの全てのsnapshotsを取得し、一つづつ返す

readSnapshotsBulk

指定したページのsnapshotsを、responseに入っている塊ごとに全て返す

redo
replaceLines
replaceLinks

指定したproject内の全てのリンクを書き換える

revertTitleLc

_を半角スペースに変換する

scrollDown

1ページ下にスクロールする

scrollHalfDown

半ページ下にスクロールする

scrollHalfUp

半ページ上にスクロールする

scrollUp

1ページ上にスクロールする

searchForJoinedProjects

search for joined projects

searchForPages

search a project for pages

searchForWatchList

search for watch list

selections
setDefaults

BaseOptionsの既定値を埋める

statusBar
takeCursor
takeInternalLines

Scrapbox内部の本文データの参照を取得する

takeSelection
takeStores
textInput
toReadableTitleURI

titleをできるだけpercent encodingせずにURIで使える形式にする

toTitleLc

文字列をtitleLc形式に変換する

undo
unpin

指定したページのピン留めを外す

upBlocks
updateCodeBlock

コードブロックの中身を更新する

updateCodeFile

REST API経由で取得できるようなコードファイルの中身をまるごと書き換える

upLines
uploadToGCS

任意のファイルをscrapbox.ioにuploadする

useStatusBar

.status-barの一区画を取得し、各種操作函数を返す

§Functions

getChars
listenStream

Streamを購読する

§Interfaces

AbsoluteLinkNode
AnchorFMNode

Anchor FM埋め込み

AudioNode

音声埋め込み

BaseOptions

全てのREST APIに共通するopitons

CaretInfo

#text-inputを構築しているReact Componentに含まれるカーソルの情報

ClickOptions

the options for click()

CodeBlock

一つのコードブロックを表す

CodeFile

一つのソースコードを表す

ExportInit

exportPagesの認証情報

ExtendedOptions

BaseeOptionsにCSRF情報を入れたもの

FileCapacityError

容量を使い切ったときに発生するerror

GCSError

Google Cloud Storage XML APIのerror

GCSFile

uploadしたファイルのメタデータ

GetCodeBlock
GetCodeBlocksFilter

getCodeBlocks()に渡すfilter

GetGyazoTokenOptions
GetLinksOptions
GetPage
GetPageOption

Options for getPage()

GetProject
GetSnapshotsOptions
GetTable
HoldDownOptions
InvalidFollowingIdError

不正なfollowingIdを渡されたときに発生するエラー

InvalidPageSnapshotIdError

不正なfollowingIdを渡されたときに発生するエラー

ItemGroup
Link

ページリンク

LinkNode
ListenStreamOptions
ListPages
ListPagesOption

Options for listPages()

ListProjects
OpenOptions
PageTransitionContextLink

ページから別のページに遷移するときの状態を表す

PageTransitionContextQuery

全文検索結果から別のページに遷移するときの状態を表す

PatchMetadata
PinOptions
Position

editor上の位置情報

PressOptions

the options for press()

ProjectUpdatesStreamCommit
Range

選択範囲を表すデータ

SimpleCodeFile

コードブロックの上書きに使う情報のinterface

SpotifyNode

Spotify埋め込み

TinyCodeBlock

pull()から取れる情報で構成したコードブロックの最低限の情報

TooLongURIError
UnPinOptions
UpdateCodeBlockOptions
UpdateCodeFileOptions

updateCodeFile()に使われているオプション

UseStatusBarResult
VideoNode

動画埋め込み

VimeoNode

Vimeo埋め込み

YoutubeListNode

Youtube List埋め込み

YoutubeNode

Youtube埋め込み

§Type Aliases

DeletePageOptions
Fetch

networkからdataをとってくる処理

Item
KeyName
PageTransitionContext
PatchOptions
ProjectUpdatesStreamEvent
Result

正常値と異常値を格納する型