Strip all graphics and images from final results (Markdown, HTML, text, and UI)
This commit is contained in:
1 parent
7609d70dd1
commit
8a91a05c2a
5 files changed
+48
-62
No files matched your search
@@ -94,7 +94,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
const response = await fetch("/api/rip", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ url, mode, max_scrolls: 4 })
|
||||
body: JSON.stringify({ url, mode, include_images: false, max_scrolls: 4 })
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
@@ -161,16 +161,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
function renderThread(thread) {
|
||||
resultSection.classList.remove("hidden");
|
||||
|
||||
// Header info
|
||||
// Header info (clean text header, no graphic avatar)
|
||||
resAuthorName.textContent = thread.author_name;
|
||||
resAuthorLink.textContent = `@${thread.author_handle}`;
|
||||
resAuthorLink.href = thread.canonical_url;
|
||||
if (thread.author_avatar) {
|
||||
resAvatar.src = thread.author_avatar;
|
||||
resAvatar.classList.remove("hidden");
|
||||
} else {
|
||||
resAvatar.classList.add("hidden");
|
||||
}
|
||||
resAvatar.classList.add("hidden");
|
||||
|
||||
resSegmentCount.textContent = thread.segment_count;
|
||||
resWordCount.textContent = thread.total_words;
|
||||
|
||||
Reference in new issue
Block a user