diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-07-29 01:15:02 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-07-29 01:15:02 +0900 |
| commit | 30df8ea1213013072f139aa26a635330457cf2bc (patch) | |
| tree | 3edeeed1f53475f0ebc9e181295c6c91a90c9ca4 /src/client/store.ts | |
| parent | feat(client): プラグインを無効にできるように (diff) | |
| download | misskey-30df8ea1213013072f139aa26a635330457cf2bc.tar.gz misskey-30df8ea1213013072f139aa26a635330457cf2bc.tar.bz2 misskey-30df8ea1213013072f139aa26a635330457cf2bc.zip | |
feat(client): AiScript: ノート書き換えAPI
Diffstat (limited to 'src/client/store.ts')
| -rw-r--r-- | src/client/store.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/store.ts b/src/client/store.ts index 67dd6ea06a..7046e10f98 100644 --- a/src/client/store.ts +++ b/src/client/store.ts @@ -111,6 +111,7 @@ export default () => new Vuex.Store({ postFormActions: [], userActions: [], noteActions: [], + noteViewInterruptors: [], }, getters: { @@ -274,6 +275,14 @@ export default () => new Vuex.Store({ } }); }, + + registerNoteViewInterruptor(state, { pluginId, handler }) { + state.noteViewInterruptors.push({ + handler: (note) => { + return state.pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]); + } + }); + }, }, actions: { |