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/0.14.5/mod.ts";

§Classes

Cursor

カーソル操作クラス

Selection
Socket
UnexpectedResponseError

§Variables

computeLine
cookie

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

cursor
cursorLine
editor
encodeTitleURI

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

exportPages

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

fetchApiCache

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

findLatestCache

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

getCSRFToken

CSRF tokenを取得する

getGyazoToken

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

getLinks

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

getPage

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

getProfile

get user profile

getProject

get the project information

getTweetInfo

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

getWebPageTitle

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

grid
importPages

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

lines
listPages

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

listProjects

list the projects' information

open

ページを開く

openInTheSameTab

同じタブでページを開く

pageCustomButtons
pageEditButtons
pageEditMenu
pageInfoMenu
pageMenu
pinNumber
popupMenu
prefetch

prefetchを実行する

randomJumpButton
readLinks

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

readLinksBulk

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

replaceLinks

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

revertTitleLc

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

searchForJoinedProjects

search for joined projects

searchForPages

search a project for pages

searchForWatchList

search for watch list

selections
setDefaults

BaseOptionsの既定値を埋める

statusBar
takeCursor
takeSelection
takeStores
textInput
toReadableTitleURI

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

toTitleLc

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

§Functions

caret

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

click

Emulate click event sequences

connect

websocketに(再)接続する

deleteLines
deletePage

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

disconnect

websocketを切断する

downBlocks
downLines
focusEnd

カーソル行の行末を長押ししてfocusを得る

getCharDOM
getChars
getDOMFromPoint
getExternalLink
getFormula
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
getNextLine
getPrevLine
getTailCharDOM
getTailLineDOM
getText
goChar

任意の文字に移動する

goEnd

行末に移動する

goEndWithoutBlank

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

goHead

行頭に移動する

goHeadLine

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

goHeadWithoutBlank

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

goLastLine

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

goLine

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

holdDown

Emulate long tap event sequence

indentBlocks
indentLines
insertIcon
insertLine
insertText
insertTimestamp
isCharDOM
isLineDOM
listenStream

Streamを購読する

makeSocket

新しいsocketを作る

moveBlocks
moveDown

カーソルを下に動かす

moveLeft

カーソルを左に動かす

moveLines
moveLinesBefore
moveRight

カーソルを右に動かす

moveUp

カーソルを上に動かす

outdentBlocks
outdentLines
patch

ページ全体を書き換える

pin

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

press

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

redo
replaceLines
scrollDown

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

scrollHalfDown

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

scrollHalfUp

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

scrollUp

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

undo
unpin

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

upBlocks
upLines
useStatusBar

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

§Interfaces

BaseOptions

全てのREST APIに共通するopitons

CaretInfo

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

ClickOptions

the options for click()

DeletePageOptions
ExportInit

exportPagesの認証情報

ExtendedOptions

BaseeOptionsにCSRF情報を入れたもの

GetGyazoTokenOptions
GetLinksOptions
GetPageOption

Options for getPage()

HoldDownOptions
InvalidFollowingIdError

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

ItemGroup
ListenStreamOptions
ListPagesOption

Options for listPages()

OpenOptions
PatchOptions
PinOptions
Position

editor上の位置情報

PressOptions

the options for press()

ProjectUpdatesStreamCommit
Range

選択範囲を表すデータ

UnPinOptions
UseStatusBarResult

§Type Aliases

Fetch

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

Item
KeyName
ProjectUpdatesStreamEvent
Result

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