diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index f3f8c1ce82..ca778d87de 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -222,7 +222,7 @@ import { isEnabledUrlPreview } from '@/instance.js'; import { focusPrev, focusNext } from '@/utility/focus.js'; import { getAppearNote } from '@/utility/get-appear-note.js'; import { prefer } from '@/preferences.js'; -import { noteViewInterruptors } from '@/plugin.js'; +import { getPluginHandlers } from '@/plugin.js'; const props = withDefaults(defineProps<{ note: Misskey.entities.Note; @@ -248,6 +248,7 @@ const currentClip = inject | null>('currentClip', nul const note = ref(deepClone(props.note)); // plugin +const noteViewInterruptors = getPluginHandlers('note_view_interruptor'); if (noteViewInterruptors.length > 0) { onMounted(async () => { let result: Misskey.entities.Note | null = deepClone(note.value); diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 7f982858f1..3f3dbf6d83 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -254,7 +254,7 @@ import MkButton from '@/components/MkButton.vue'; import { isEnabledUrlPreview } from '@/instance.js'; import { getAppearNote } from '@/utility/get-appear-note.js'; import { prefer } from '@/preferences.js'; -import { noteViewInterruptors } from '@/plugin.js'; +import { getPluginHandlers } from '@/plugin.js'; const props = withDefaults(defineProps<{ note: Misskey.entities.Note; @@ -268,6 +268,7 @@ const inChannel = inject('inChannel', null); const note = ref(deepClone(props.note)); // plugin +const noteViewInterruptors = getPluginHandlers('note_view_interruptor'); if (noteViewInterruptors.length > 0) { onMounted(async () => { let result: Misskey.entities.Note | null = deepClone(note.value); diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 4edb147b86..755e13279c 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -136,7 +136,7 @@ import { claimAchievement } from '@/utility/achievements.js'; import { emojiPicker } from '@/utility/emoji-picker.js'; import { mfmFunctionPicker } from '@/utility/mfm-function-picker.js'; import { prefer } from '@/preferences.js'; -import { notePostInterruptors, postFormActions } from '@/plugin.js'; +import { getPluginHandlers } from '@/plugin.js'; const $i = signinRequired(); @@ -197,6 +197,7 @@ const showingOptions = ref(false); const textAreaReadOnly = ref(false); const justEndedComposition = ref(false); const renoteTargetNote: ShallowRef = shallowRef(props.renote); +const postFormActions = getPluginHandlers('post_form_action'); const draftKey = computed((): string => { let key = props.channel ? `channel:${props.channel.id}` : ''; @@ -823,6 +824,7 @@ async function post(ev?: MouseEvent) { } // plugin + const notePostInterruptors = getPluginHandlers('note_post_interruptor'); if (notePostInterruptors.length > 0) { for (const interruptor of notePostInterruptors) { try { diff --git a/packages/frontend/src/pages/page.vue b/packages/frontend/src/pages/page.vue index 18322cde91..0405a722ab 100644 --- a/packages/frontend/src/pages/page.vue +++ b/packages/frontend/src/pages/page.vue @@ -122,7 +122,7 @@ import { getStaticImageUrl } from '@/utility/media-proxy.js'; import { copyToClipboard } from '@/utility/copy-to-clipboard.js'; import { useRouter } from '@/router/supplier.js'; import { prefer } from '@/preferences.js'; -import { pageViewInterruptors } from '@/plugin.js'; +import { getPluginHandlers } from '@/plugin.js'; const router = useRouter(); @@ -151,6 +151,7 @@ function fetchPage() { page.value = _page; // plugin + const pageViewInterruptors = getPluginHandlers('page_view_interruptor'); if (pageViewInterruptors.length > 0) { let result = deepClone(_page); for (const interruptor of pageViewInterruptors) { diff --git a/packages/frontend/src/pages/settings/plugin.vue b/packages/frontend/src/pages/settings/plugin.vue index 741c776bb8..5619d696f2 100644 --- a/packages/frontend/src/pages/settings/plugin.vue +++ b/packages/frontend/src/pages/settings/plugin.vue @@ -28,14 +28,14 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ plugin.name }}v{{ plugin.version }} {{ i18n.ts.makeActive }}
@@ -64,10 +64,6 @@ SPDX-License-Identifier: AGPL-3.0-only
-
- {{ i18n.ts.copy }} -
-
@@ -77,10 +73,6 @@ SPDX-License-Identifier: AGPL-3.0-only
-
- {{ i18n.ts.copy }} -
-
@@ -94,6 +86,7 @@ SPDX-License-Identifier: AGPL-3.0-only