upd: prompt for confirmation on external links

This commit is contained in:
Marie 2024-09-16 01:12:20 +02:00
parent e21e2530e6
commit d2564836ed
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
4 changed files with 28 additions and 3 deletions

View file

@ -97,6 +97,7 @@ function createPluginEnv(opts: { plugin: Plugin; storageKey: string }): Record<s
const { canceled } = await os.confirm({
type: 'question',
text: i18n.tsx.confirmRemoteUrl({x: url.value}),
plain: true,
});
if (canceled) return;
window.open(url.value, '_blank', 'noopener');