Remove commented debug code
| @@ -2370,8 +2370,6 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll | ||
| 2370 | 2370 | |
| 2371 | 2371 | addCopyToCodeBlocks(newMessage); |
| 2372 | 2372 | |
| 2373 | - //const currentMessage = $('#chat').children().filter(`[mesid="${chat.length - 1}"]`); | |
| 2374 | - | |
| 2375 | 2373 | // Set the swipes counter for past messages, only visible if 'Show Swipes on All Message' is enabled |
| 2376 | 2374 | if (!params.isUser && newMessageId !== 0 && newMessageId !== chat.length - 1) { |
| 2377 | 2375 | const swipesNum = chat[newMessageId].swipes?.length; |
| @@ -2379,11 +2377,9 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll | ||
| 2379 | 2377 | newMessage.find('.swipes-counter').text(`${swipeId}\u200B/\u200b${swipesNum}`); |
| 2380 | 2378 | } |
| 2381 | 2379 | |
| 2382 | - | |
| 2383 | 2380 | if (showSwipes) { |
| 2384 | 2381 | $('#chat .mes').last().addClass('last_mes'); |
| 2385 | 2382 | $('#chat .mes').eq(-2).removeClass('last_mes'); |
| 2386 | - //.find('.swipe_right').hide(); //otherwise it stays looking like it did when it was last_mes | |
| 2387 | 2383 | hideSwipeButtons(); |
| 2388 | 2384 | showSwipeButtons(); |
| 2389 | 2385 | } |
| @@ -7483,7 +7479,6 @@ export function showSwipeButtons() { | ||
| 7483 | 7479 | //had to add this to make the swipe counter work |
| 7484 | 7480 | //(copied from the onclick functions for swipe buttons.. |
| 7485 | 7481 | //don't know why the array isn't set for non-swipe messsages in Generate or addOneMessage..) |
| 7486 | - | |
| 7487 | 7482 | if (chat[chat.length - 1]['swipe_id'] === undefined) { // if there is no swipe-message in the last spot of the chat array |
| 7488 | 7483 | chat[chat.length - 1]['swipe_id'] = 0; // set it to id 0 |
| 7489 | 7484 | chat[chat.length - 1]['swipes'] = []; // empty the array |
| @@ -7502,33 +7497,24 @@ export function showSwipeButtons() { | ||
| 7502 | 7497 | } |
| 7503 | 7498 | //only show right when generate is off, or when next right swipe would not make a generate happen |
| 7504 | 7499 | if (is_send_press === false || chat[chat.length - 1].swipes.length >= swipeId) { |
| 7505 | - // console.error('showingSwipeButtons: showing.'); | |
| 7506 | 7500 | swipeRight.css('display', 'flex').css('opacity', '0.3'); |
| 7507 | 7501 | swipeCounter.css('opacity', '0.3'); |
| 7508 | 7502 | } |
| 7509 | - //console.log((chat[chat.length - 1])); | |
| 7510 | 7503 | if ((chat[chat.length - 1].swipes.length - swipeId) === 1) { |
| 7511 | - // console.error('highlighting R swipe'); | |
| 7512 | - | |
| 7513 | 7504 | //chevron was moved out of hardcode in HTML to class toggle dependent on last_mes or not |
| 7514 | 7505 | //necessary for 'swipe_right' div in past messages to have no chevron if 'show swipes for all messages' is turned on |
| 7515 | 7506 | swipeRight.css('opacity', '0.7'); |
| 7516 | 7507 | swipeCounter.css('opacity', '0.7'); |
| 7517 | 7508 | } |
| 7518 | - //console.log(swipesCounterHTML); | |
| 7519 | 7509 | |
| 7520 | 7510 | //allows for writing individual swipe counters for past messages |
| 7521 | 7511 | const lastSwipeCounter = $('.last_mes .swipes-counter'); |
| 7522 | 7512 | lastSwipeCounter.text(swipeCounterText).show(); |
| 7523 | 7513 | |
| 7524 | - //console.log(swipeId); | |
| 7525 | - //console.log(chat[chat.length - 1].swipes.length); | |
| 7526 | - | |
| 7527 | 7514 | switchSwipeNumAllMessages(); |
| 7528 | 7515 | } |
| 7529 | 7516 | |
| 7530 | 7517 | export function hideSwipeButtons() { |
| 7531 | - // console.error('hideswipebuttons entered'); | |
| 7532 | 7518 | $('#chat').find('.swipe_right').hide(); |
| 7533 | 7519 | $('#chat').find('.last_mes .swipes-counter').hide(); |
| 7534 | 7520 | $('#chat').find('.swipe_left').hide(); |