diff --git a/public/auto_source.css b/public/auto_source.css index 60a79f5..00e6ae2 100644 --- a/public/auto_source.css +++ b/public/auto_source.css @@ -7,7 +7,6 @@ .auto_source input, .auto_source button { width: 100%; - font-family: monospace; } .auto_source > form { @@ -51,13 +50,15 @@ .auto_source iframe { margin-top: 2em; - border: 2px groove var(--highlight); + border: 2px groove transparent; border-radius: 0.5em; display: none; /* Hide by default */ + transition: border-color 0.2s; } .auto_source iframe[src] { display: block; min-height: 50em; max-height: 80vh; + border-color: var(--highlight); } diff --git a/public/auto_source.js b/public/auto_source.js index 6b85d05..d4c1c06 100644 --- a/public/auto_source.js +++ b/public/auto_source.js @@ -189,7 +189,6 @@ const autoSource = (function () { try { const textToCopy = this.rssUrlField.value; await navigator.clipboard.writeText(textToCopy); - console.log("Text copied to clipboard:", textToCopy); } catch (error) { console.error("Failed to copy text to clipboard:", error); } @@ -211,8 +210,8 @@ const autoSource = (function () { */ async subscribeToFeed() { const feedUrl = this.rssUrlField.value; - const storedUser = LocalStorageFacade.getOrAskUser("username"); - const storedPassword = LocalStorageFacade.getOrAskUser("password"); + const storedUser = LocalStorageFacade.getOrAsk("username"); + const storedPassword = LocalStorageFacade.getOrAsk("password"); const url = new URL(feedUrl); url.username = storedUser; @@ -255,16 +254,16 @@ const autoSource = (function () { return localStorage.removeItem(key); } - static getOrAskUser(columnName) { - let value = LocalStorageFacade.get(columnName); + static getOrAsk(key) { + let value = LocalStorageFacade.get(key); while (typeof value !== "string" || value === "") { - value = window.prompt(`Please enter your ${columnName}:`); + value = window.prompt(`Please enter your ${key}:`); if (!value || value.trim() === "") { - alert(`Blank ${columnName} submitted. Try again!`); + alert(`Blank ${key} submitted. Try again!`); } else { - LocalStorageFacade.set(columnName, value); + LocalStorageFacade.set(key, value); } }