Remove commented debug code

7d0cc9e372b57efd2d31baa78f1a7160aa128184

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +0 -14Showing whitespace changes
public/script.js+0 -14
@@ -2370,8 +2370,6 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll
23702370
23712371 addCopyToCodeBlocks(newMessage);
23722372
2373- //const currentMessage = $('#chat').children().filter(`[mesid="${chat.length - 1}"]`);
2374-
23752373 // Set the swipes counter for past messages, only visible if 'Show Swipes on All Message' is enabled
23762374 if (!params.isUser && newMessageId !== 0 && newMessageId !== chat.length - 1) {
23772375 const swipesNum = chat[newMessageId].swipes?.length;
@@ -2379,11 +2377,9 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll
23792377 newMessage.find('.swipes-counter').text(`${swipeId}\u200B/\u200b${swipesNum}`);
23802378 }
23812379
2382-
23832380 if (showSwipes) {
23842381 $('#chat .mes').last().addClass('last_mes');
23852382 $('#chat .mes').eq(-2).removeClass('last_mes');
2386- //.find('.swipe_right').hide(); //otherwise it stays looking like it did when it was last_mes
23872383 hideSwipeButtons();
23882384 showSwipeButtons();
23892385 }
@@ -7483,7 +7479,6 @@ export function showSwipeButtons() {
74837479 //had to add this to make the swipe counter work
74847480 //(copied from the onclick functions for swipe buttons..
74857481 //don't know why the array isn't set for non-swipe messsages in Generate or addOneMessage..)
7486-
74877482 if (chat[chat.length - 1]['swipe_id'] === undefined) { // if there is no swipe-message in the last spot of the chat array
74887483 chat[chat.length - 1]['swipe_id'] = 0; // set it to id 0
74897484 chat[chat.length - 1]['swipes'] = []; // empty the array
@@ -7502,33 +7497,24 @@ export function showSwipeButtons() {
75027497 }
75037498 //only show right when generate is off, or when next right swipe would not make a generate happen
75047499 if (is_send_press === false || chat[chat.length - 1].swipes.length >= swipeId) {
7505- // console.error('showingSwipeButtons: showing.');
75067500 swipeRight.css('display', 'flex').css('opacity', '0.3');
75077501 swipeCounter.css('opacity', '0.3');
75087502 }
7509- //console.log((chat[chat.length - 1]));
75107503 if ((chat[chat.length - 1].swipes.length - swipeId) === 1) {
7511- // console.error('highlighting R swipe');
7512-
75137504 //chevron was moved out of hardcode in HTML to class toggle dependent on last_mes or not
75147505 //necessary for 'swipe_right' div in past messages to have no chevron if 'show swipes for all messages' is turned on
75157506 swipeRight.css('opacity', '0.7');
75167507 swipeCounter.css('opacity', '0.7');
75177508 }
7518- //console.log(swipesCounterHTML);
75197509
75207510 //allows for writing individual swipe counters for past messages
75217511 const lastSwipeCounter = $('.last_mes .swipes-counter');
75227512 lastSwipeCounter.text(swipeCounterText).show();
75237513
7524- //console.log(swipeId);
7525- //console.log(chat[chat.length - 1].swipes.length);
7526-
75277514 switchSwipeNumAllMessages();
75287515}
75297516
75307517export function hideSwipeButtons() {
7531- // console.error('hideswipebuttons entered');
75327518 $('#chat').find('.swipe_right').hide();
75337519 $('#chat').find('.last_mes .swipes-counter').hide();
75347520 $('#chat').find('.swipe_left').hide();