Skip to content

Instantly share code, notes, and snippets.

@syuilo
Last active March 9, 2025 12:24
Show Gist options
  • Save syuilo/4919f0a667443b50ecc83baf69c52f5e to your computer and use it in GitHub Desktop.
Save syuilo/4919f0a667443b50ecc83baf69c52f5e to your computer and use it in GitHub Desktop.
### {
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
/// @ 0.19.0
### {
name: "Fujiwara"
version: "0.0.0"
author: "syuilo"
description: "投稿内容に濁点を追加できるようにします。"
}
Plugin:register_post_form_action("fujiwara", @(form, update) {
let text = `{form.text.split().join("゛")}゛`
update("text", text)
})
/// @ 0.19.0
### {
name: "感情がない"
version: "0.0.0"
author: "syuilo"
description: "皆の感情を消すプラグイン"
permissions: []
config: null
}
Plugin:register_note_view_interruptor(@(note) {
if (note.text != null) {
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