Update index.html
Browse files- index.html +34 -0
index.html
CHANGED
|
@@ -113,6 +113,7 @@
|
|
| 113 |
</div>
|
| 114 |
<div class="modal-body" id="synopsisContent"></div>
|
| 115 |
<div class="modal-footer">
|
|
|
|
| 116 |
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
| 117 |
</div>
|
| 118 |
</div>
|
|
@@ -439,6 +440,25 @@
|
|
| 439 |
container.innerHTML = synopsisHTML;
|
| 440 |
}
|
| 441 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
function toggleFullscreen() {
|
| 443 |
const graphElement = document.getElementById('graph');
|
| 444 |
const controlsElement = document.getElementById('controls');
|
|
@@ -496,3 +516,17 @@
|
|
| 496 |
</script>
|
| 497 |
</body>
|
| 498 |
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
</div>
|
| 114 |
<div class="modal-body" id="synopsisContent"></div>
|
| 115 |
<div class="modal-footer">
|
| 116 |
+
<button type="button" class="btn btn-info" onclick="saveSynopsisAsTxt()">💾 Save as TXT</button>
|
| 117 |
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
| 118 |
</div>
|
| 119 |
</div>
|
|
|
|
| 440 |
container.innerHTML = synopsisHTML;
|
| 441 |
}
|
| 442 |
|
| 443 |
+
function saveSynopsisAsTxt() {
|
| 444 |
+
const synopsisContentDiv = document.getElementById("synopsisContent");
|
| 445 |
+
let rawText = synopsisContentDiv.innerText; // Get all visible text
|
| 446 |
+
|
| 447 |
+
// Further clean up if needed (e.g., remove multiple blank lines, trim spaces)
|
| 448 |
+
rawText = rawText.replace(/\n\s*\n/g, '\n\n').trim(); // Replace multiple newlines with single ones
|
| 449 |
+
|
| 450 |
+
const blob = new Blob([rawText], { type: "text/plain;charset=utf-8" });
|
| 451 |
+
const url = URL.createObjectURL(blob);
|
| 452 |
+
const a = document.createElement("a");
|
| 453 |
+
a.href = url;
|
| 454 |
+
a.download = "story_synopsis.txt"; // Default file name
|
| 455 |
+
document.body.appendChild(a);
|
| 456 |
+
a.click();
|
| 457 |
+
document.body.removeChild(a);
|
| 458 |
+
URL.revokeObjectURL(url); // Clean up the URL object
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
|
| 462 |
function toggleFullscreen() {
|
| 463 |
const graphElement = document.getElementById('graph');
|
| 464 |
const controlsElement = document.getElementById('controls');
|
|
|
|
| 516 |
</script>
|
| 517 |
</body>
|
| 518 |
</html>
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
|
| 524 |
+
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
|
| 529 |
+
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
|