Fix: Prevent data loss on bulk regex move to scoped scripts (#4760)

* Fix: Prevent data loss in regex bulk move

* prevents moving to scoped scripts with group selected for bulkedit
This commit is contained in:
Serena
2025-11-11 22:20:16 +09:00
committed by GitHub
parent dc4e0270e7
commit a0bff84e4e
+8
View File
@@ -1855,6 +1855,14 @@ jQuery(async () => {
});
$('#bulk_regex_move_to_scoped').on('click', async () => {
if (this_chid === undefined) {
toastr.error(t`No character selected.`);
return;
}
if (selected_group) {
toastr.error(t`Cannot edit scoped scripts in group chats.`);
return;
}
const confirm = await callGenericPopup(t`Are you sure you want to move the selected regex scripts to scoped?`, POPUP_TYPE.CONFIRM);
if (!confirm) {
return;