diff --git a/frontend/about.html b/frontend/about.html index 449555b..303a603 100644 --- a/frontend/about.html +++ b/frontend/about.html @@ -32,11 +32,11 @@
The data comes from Common Crawl, a free, open archive of the web. Every month, we process the latest crawl, extract website titles, download the favicons, and bundle it up into the site you see here.
-Click on a tab to visit the site and scroll down for more tabs.
+Click on a tab to visit the site and scroll down for more tabs. Some sites do not allow embedding so clicking them will open a new tab (in your browser) instead.
-Note that some sites do not allow embedding and will open a new tab instead. Also note that just like the web itself, some sites are broken, not suitable for work, trying to harvest your data, serving malware, or an affront to humanity itself.
+Note that, just like the web itself, some sites are broken, profane, fake news, pornographic, trying to harvest your data, serving malware, or an affront to humanity itself. But some of them are pretty cool too.
-EveryTab just shows a random slice of the Web, in all its messy and beautiful glory.
+EveryTab just shows a random slice of the web, in all its messy and beautiful glory.
Enjoy!
diff --git a/frontend/site.js b/frontend/site.js index 4d1f0b0..dce91ec 100644 --- a/frontend/site.js +++ b/frontend/site.js @@ -82,10 +82,10 @@ function createTab(entry) { const title = document.createElement("span"); title.className = "tab-title"; - title.textContent = entry.title || entry.host; + title.textContent = entry.title || entry.url; tab.appendChild(title); - tab.title = entry.title || entry.host; + tab.title = entry.title || entry.url; // Click handler tab.addEventListener("click", () => { @@ -93,11 +93,10 @@ function createTab(entry) { openInlineViewer(tab, entry, "/about.html"); return; } - const url = `${entry.protocol || "https"}://${entry.host}`; if (entry.iframe_ok) { - openInlineViewer(tab, entry, url); + openInlineViewer(tab, entry, entry.url); } else { - window.open(url, "_blank", "noopener"); + window.open(entry.url, "_blank", "noopener"); } }); @@ -163,7 +162,7 @@ async function loadMore() { // Inject the "About EveryTab" tab at a random position in the first load if (container.children.length === 0) { const aboutEntry = { - host: "everytab.site/about.html", + url: "https://everytab.site/about.html", title: "About EveryTab", icon: "", iframe_ok: true, @@ -241,14 +240,14 @@ function openInlineViewer(tabEl, entry, url) { const title = document.createElement("span"); title.className = "tab-title"; - title.textContent = entry.title || entry.host; + title.textContent = entry.title || entry.url; header.appendChild(title); const link = document.createElement("a"); link.href = url; link.target = "_blank"; link.rel = "noopener"; - link.textContent = entry.host + " ↗"; + link.textContent = entry.url + " ↗"; header.appendChild(link); const close = document.createElement("button"); diff --git a/pipeline/05_bundle_gen/bundle.go b/pipeline/05_bundle_gen/bundle.go index 7dd7693..274f4ec 100644 --- a/pipeline/05_bundle_gen/bundle.go +++ b/pipeline/05_bundle_gen/bundle.go @@ -9,7 +9,7 @@ import ( // BundleEntry is one tab in a bundle JSON file. type BundleEntry struct { - Host string `json:"host"` + URL string `json:"url"` Title string `json:"title"` Icon string `json:"icon"` IconW int `json:"icon_w,omitempty"` @@ -25,7 +25,7 @@ type Bundle struct { // buildEntry creates a BundleEntry for a host, converting its icon if available. func buildEntry(host HostRow, iconsDir string, logWriter *LogWriter, stats *Stats) BundleEntry { entry := BundleEntry{ - Host: host.Hostname, + URL: host.Protocol + "://" + host.Hostname, Title: host.HtmlTitle, Icon: "", IframeOk: host.IframeAllowed,