Skip to content

Instantly share code, notes, and snippets.

@syuilo

syuilo/api-test.is

Last active Jul 29, 2020
Embed
What would you like to do?
### {
name: "API test"
version: "0.0.0"
author: "syuilo"
description: "Plugin description here"
permissions: ["write:notes"]
}
Mk:api("notes/create" {
text: "test"
})
### {
name: "Config test"
version: "0.0.0"
author: "syuilo"
description: "Plugin description here"
permissions: []
config: {
message: {
type: "string"
label: "メッセージ"
description: "表示されるメッセージを設定します。"
default: "Hello, Misskey!"
}
enabled: {
type: "boolean"
label: "有効"
description: "メッセージを表示するかどうかを設定します。"
default: yes
}
}
}
? Plugin:config.enabled {
Mk:dialog("test" Plugin:config.message)
}
### {
name: "Plugin name here"
version: "0.0.0"
author: "Your name here"
description: "Plugin description here"
permissions: []
config: _
}
// something
### {
name: "Fujiwara"
version: "0.0.0"
author: "syuilo"
description: "投稿内容に濁点を追加できるようにします。"
}
Plugin:register_post_form_action("fujiwara" @(form update) {
#text = `{Arr:join(Str:split(form.text), "゛")}゛`
update("text" text)
})
### {
name: "感情がない"
version: "0.0.0"
author: "syuilo"
description: "皆の感情を消すプラグイン"
permissions: []
config: _
}
Plugin:register_note_view_interruptor(@(note) {
? Core:not((note.text = _)) {
note.text <- `{note.text}以外の感情がない`
}
note
})
### {
name: "ノートIDビューワ"
version: "0.0.0"
author: "syuilo"
description: "ノートメニューにノートIDを表示するボタンを追加します。"
}
Plugin:register_note_action("IDを表示" @(note) {
Mk:dialog(`ノートID` note.id)
})
### {
name: "auto fujiwara"
version: "0.0.0"
author: "syuilo"
description: "Plugin description here"
permissions: []
config: _
}
Plugin:register_note_post_interruptor(@(note) {
? Core:not((note.text = _)) {
note.text <- `{Arr:join(Str:split(note.text), "゛")}゛`
}
note
})
### {
name: "fujiwara 2"
version: "0.0.0"
author: "syuilo"
description: "Plugin description here"
permissions: []
config: _
}
Plugin:register_note_view_interruptor(@(note) {
? Core:not((note.text = _)) {
note.text <- `{Arr:join(Str:split(note.text), "゛")}゛`
}
note
})
### {
name: "ユーザーIDビューワ"
version: "0.0.0"
author: "syuilo"
description: "ユーザーメニューにユーザーIDを表示するボタンを追加します。"
}
Plugin:register_user_action("IDを表示" @(user) {
Mk:dialog(`{user.name}のユーザーID` user.id)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.