Public
Back
Version 6
10/4/2024
import { versionLogger } from "https://esm.town/v/willthereader/versionLoggger";
// version one is the one with the javascript scenario
function App() {
let url = "";
let chapterTitles = "";
let result = null;
let loading = false;
const handleSubmit = async (e) => {
e.preventDefault();
loading = true;
updateUI();
console.log(`Fetching threadmarks for URL: ${url}`);
try {
result = await fetchThreadmarksFromServer(url, chapterTitles);
} catch (error) {
console.log(`Error occurred while fetching threadmarks: ${error.message}`);
result = { error: error.message };
}
loading = false;
updateUI();
};
const updateUI = () => {
const root = document.getElementById("root");
root.innerHTML = `
<div>
<h1>Threadmark Fetcher and Comparator</h1>
<form id="threadmarkForm">
<div>
<input
type="url"
id="urlInput"
value="${url}"
placeholder="Enter URL to fetch threadmarks"
required
willthereader-threadmarklistfetcher2.web.val.run
Updated: October 4, 2024