diff --git a/public/script.js b/public/script.js index da702bbea..9c6e061b6 100644 --- a/public/script.js +++ b/public/script.js @@ -6528,10 +6528,16 @@ $(document).ready(function () { $(this).parent().children(".for_checkbox").css("display", "none"); } }); + } else { + console.debug(` + ERR -- could not enter del mode + this_chid: ${this_chid} + is_send_press: ${is_send_press} + selected_group: ${selected_group} + is_group_generating: ${is_group_generating}`) } is_delete_mode = true; } - console.log('clicked item, should hide options'); hideMenu(); }); diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index bc104d4b6..b68caaea2 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -12,6 +12,7 @@ import { eventSource, event_types, getCurrentChatId, + is_send_press, } from "../script.js"; import { favsToHotswap } from "./RossAscends-mods.js"; import { @@ -874,6 +875,12 @@ function doNewchat() { $("#dialogue_popup_ok").trigger('click'); } +function doDelMode() { + setTimeout(() => { + $("#option_delete_mes").trigger('click') + }, 1); +} + $(document).ready(() => { // Settings that go to settings.json $("#collapse-newlines-checkbox").change(function () { @@ -1227,6 +1234,7 @@ $(document).ready(() => { browser_has_focus = false; }); - registerSlashCommand('vn', toggleWaifu, ['vn'], ' – swaps Visual Novel Mode On/Off', true, true); + registerSlashCommand('vn', toggleWaifu, ['vn'], ' – swaps Visual Novel Mode On/Off', false, true); registerSlashCommand('newchat', doNewchat, ['newchat'], ' – start a new chat with current character', true, true); + registerSlashCommand('delmode', doDelMode, ['delmode'], ' – enter message deletion mode', true, true); });