switched bundle host field to url to retain http
This commit is contained in:
parent
7f36e99443
commit
2f1547a912
3 changed files with 12 additions and 13 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue