/delmode - quickly enter message deletion mode

This commit is contained in:
RossAscends
2023-06-15 13:44:28 +09:00
parent ede87fcf33
commit 1e87d973f1
2 changed files with 16 additions and 2 deletions

View File

@ -6528,10 +6528,16 @@ $(document).ready(function () {
$(this).parent().children(".for_checkbox").css("display", "none"); $(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; is_delete_mode = true;
} }
console.log('clicked item, should hide options');
hideMenu(); hideMenu();
}); });

View File

@ -12,6 +12,7 @@ import {
eventSource, eventSource,
event_types, event_types,
getCurrentChatId, getCurrentChatId,
is_send_press,
} from "../script.js"; } from "../script.js";
import { favsToHotswap } from "./RossAscends-mods.js"; import { favsToHotswap } from "./RossAscends-mods.js";
import { import {
@ -874,6 +875,12 @@ function doNewchat() {
$("#dialogue_popup_ok").trigger('click'); $("#dialogue_popup_ok").trigger('click');
} }
function doDelMode() {
setTimeout(() => {
$("#option_delete_mes").trigger('click')
}, 1);
}
$(document).ready(() => { $(document).ready(() => {
// Settings that go to settings.json // Settings that go to settings.json
$("#collapse-newlines-checkbox").change(function () { $("#collapse-newlines-checkbox").change(function () {
@ -1227,6 +1234,7 @@ $(document).ready(() => {
browser_has_focus = false; 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('newchat', doNewchat, ['newchat'], ' start a new chat with current character', true, true);
registerSlashCommand('delmode', doDelMode, ['delmode'], ' enter message deletion mode', true, true);
}); });