mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 08:55:50 +00:00
Update page-window.js
This commit is contained in:
@@ -120,12 +120,22 @@ export function showHtmlModal(title, htmlContent, options = {}) {
|
||||
}
|
||||
|
||||
|
||||
function escapeHtml(text) {
|
||||
if (!text) return '';
|
||||
return text
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
export function showSummaryModal(summaryText, callbacks) {
|
||||
const { onConfirm, onRegenerate, onCancel } = callbacks;
|
||||
|
||||
const modalHtml = `
|
||||
<div class="historiographer-summary-modal">
|
||||
<textarea class="text_pole" style="width: 100%; height: 50vh; resize: vertical;">${summaryText}</textarea>
|
||||
<textarea class="text_pole" style="width: 100%; height: 50vh; resize: vertical;">${escapeHtml(summaryText)}</textarea>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user