Linter fixes
| @@ -264,7 +264,7 @@ export async function convertSoloToGroupChat() { | |||
| 264 | return; | 264 | return; |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | const confirm = await Popup.show.confirm(t`Convert to group chat`, t`Are you sure you want to convert this chat to a group chat?` + `<br />` + t`This cannot be reverted.`); | 267 | const confirm = await Popup.show.confirm(t`Convert to group chat`, t`Are you sure you want to convert this chat to a group chat?` + '<br />' + t`This cannot be reverted.`); |
| 268 | if (!confirm) { | 268 | if (!confirm) { |
| 269 | return; | 269 | return; |
| 270 | } | 270 | } |
| @@ -248,7 +248,7 @@ function onAlternativeClicked(tokenLogprobs, alternative) { | |||
| 248 | * coordinates from a PointerEvent, this function identifies the exact | 248 | * coordinates from a PointerEvent, this function identifies the exact |
| 249 | * word clicked and returns the text preceding it within the span. | 249 | * word clicked and returns the text preceding it within the span. |
| 250 | * | 250 | * |
| 251 | * If the clicked position does not resolve to a valid word or text node, | 251 | * If the clicked position does not resolve to a valid word or text node, |
| 252 | * the entire span text is returned as a fallback. | 252 | * the entire span text is returned as a fallback. |
| 253 | * | 253 | * |
| 254 | * @param {PointerEvent} event - The click event containing the x and y coordinates. | 254 | * @param {PointerEvent} event - The click event containing the x and y coordinates. |
| @@ -268,7 +268,7 @@ function getTextBeforeClickedWord(event, spanText) { | |||
| 268 | const text = textNode.nodeValue; | 268 | const text = textNode.nodeValue; |
| 269 | 269 | ||
| 270 | // Find the boundaries of the clicked word | 270 | // Find the boundaries of the clicked word |
| 271 | const start = text.lastIndexOf(" ", offset - 1) + 1; | 271 | const start = text.lastIndexOf(' ', offset - 1) + 1; |
| 272 | 272 | ||
| 273 | // Return the text before the clicked word | 273 | // Return the text before the clicked word |
| 274 | return text.slice(0, start); | 274 | return text.slice(0, start); |
| @@ -3613,7 +3613,7 @@ async function onExportPresetClick() { | |||
| 3613 | const fieldValues = sensitiveFields.filter(field => preset[field]).map(field => `<b>${field}</b>: <code>${preset[field]}</code>`); | 3613 | const fieldValues = sensitiveFields.filter(field => preset[field]).map(field => `<b>${field}</b>: <code>${preset[field]}</code>`); |
| 3614 | const shouldConfirm = fieldValues.length > 0; | 3614 | const shouldConfirm = fieldValues.length > 0; |
| 3615 | const textHeader = t`Your preset contains proxy and/or custom endpoint settings.`; | 3615 | const textHeader = t`Your preset contains proxy and/or custom endpoint settings.`; |
| 3616 | const textMessage = `<div>` + t`Do you want to remove these fields before exporting?` + `</div><br>${DOMPurify.sanitize(fieldValues.join('<br>'))}`; | 3616 | const textMessage = '<div>' + t`Do you want to remove these fields before exporting?` + `</div><br>${DOMPurify.sanitize(fieldValues.join('<br>'))}`; |
| 3617 | const cancelButton = { text: 'Cancel', result: POPUP_RESULT.CANCELLED, appendAtEnd: true }; | 3617 | const cancelButton = { text: 'Cancel', result: POPUP_RESULT.CANCELLED, appendAtEnd: true }; |
| 3618 | const popupOptions = { customButtons: [cancelButton] }; | 3618 | const popupOptions = { customButtons: [cancelButton] }; |
| 3619 | const popupResult = await Popup.show.confirm(textHeader, textMessage, popupOptions); | 3619 | const popupResult = await Popup.show.confirm(textHeader, textMessage, popupOptions); |
| @@ -4370,7 +4370,7 @@ async function onOpenrouterModelSortChange() { | |||
| 4370 | async function onNewPresetClick() { | 4370 | async function onNewPresetClick() { |
| 4371 | const popupText = ` | 4371 | const popupText = ` |
| 4372 | <h3>` + t`Preset name:` + `</h3> | 4372 | <h3>` + t`Preset name:` + `</h3> |
| 4373 | <h4>` + t`Hint: Use a character/group name to bind preset to a specific chat.` + `</h4>`; | 4373 | <h4>` + t`Hint: Use a character/group name to bind preset to a specific chat.` + '</h4>'; |
| 4374 | const name = await callPopup(popupText, 'input', oai_settings.preset_settings_openai); | 4374 | const name = await callPopup(popupText, 'input', oai_settings.preset_settings_openai); |
| 4375 | 4375 | ||
| 4376 | if (!name) { | 4376 | if (!name) { |