Show me online enabled by default

This commit is contained in:
2026-10-21 13:37:09 -04:00
parent c5ad9bf7b8
commit 69d49073f0
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ let selectedSection = null;
let chatSignature = null;
let chatLoading = false;
const PRESENCE_KEY = "thebutton-share-presence";
let sharePresence = localStorage.getItem(PRESENCE_KEY) === "true";
let sharePresence = localStorage.getItem(PRESENCE_KEY) !== "false";
let presenceTab = sessionStorage.getItem("thebutton-presence-tab");
if (!presenceTab) {
presenceTab = Array.from(crypto.getRandomValues(new Uint8Array(16)), (n) => n.toString(16).padStart(2, "0")).join("");
@@ -207,7 +207,7 @@ window.addEventListener("storage", (event) => {
renderAlertSettings();
}
if (event.key === PRESENCE_KEY || event.key === TOKEN_KEY) {
sharePresence = localStorage.getItem(PRESENCE_KEY) === "true";
sharePresence = localStorage.getItem(PRESENCE_KEY) !== "false";
token = localStorage.getItem(TOKEN_KEY);
updateButton();
syncPresence();
+1 -1
View File
@@ -133,7 +133,7 @@
<p id="my-subscribed" hidden>You're on the mailing list. Thanks!</p>
<div class="presence-preference">
<label for="presence-opt-in"><input id="presence-opt-in" type="checkbox" aria-describedby="presence-help"> Show me online</label>
<p id="presence-help">Optional. Share that you're here, and your name in chat while viewing it. Only visible tabs count; no activity history is saved.</p>
<p id="presence-help">On by default. Uncheck to hide your online status and chat presence. Only visible tabs count; no activity history is saved.</p>
<p id="presence-error" class="error" role="status"></p>
</div>
<div class="score-grid">