feat(plugins): add JavaScript plugin system with overlay panel (#303)

This commit is contained in:
sudacode authored and GitHub committed 2026-10-31 19:09:54 -07:00
1 parent 90fc7cf940
commit a9a4c4f083
110 files changed
+5897 -344

No files matched your search

+10
View File
@@ -50,6 +50,7 @@ const SESSION_ACTION_IDS: SessionActionId[] = [
'replayCurrentSubtitle',
'playNextSubtitle',
'cycleRuntimeOption',
'runPluginAction',
];
const RUNTIME_OPTION_IDS: RuntimeOptionId[] = [
@@ -111,6 +112,15 @@ function parseSessionActionPayload(
};
}
if (actionId === 'runPluginAction') {
if (!isObject(value)) return null;
if (Object.keys(value).some((key) => key !== 'pluginActionId')) return null;
if (typeof value.pluginActionId !== 'string' || !value.pluginActionId.includes('/')) {
return null;
}
return { pluginActionId: value.pluginActionId };
}
return value === undefined ? undefined : null;
}