From 51bf123cab1456c626a3fa3d76617c35ef7378c2 Mon Sep 17 00:00:00 2001 From: Sulthan Zaki Date: Mon, 27 Jul 2026 17:17:12 +0700 Subject: [PATCH] feat(userscript): show pending writes in the panel nav --- userscript/manga-bookmark.user.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/userscript/manga-bookmark.user.js b/userscript/manga-bookmark.user.js index fc5c498..5b7d483 100644 --- a/userscript/manga-bookmark.user.js +++ b/userscript/manga-bookmark.user.js @@ -782,6 +782,7 @@ }); root.getElementById("backdrop").addEventListener("click", togglePanel); root.getElementById("closeBtn").addEventListener("click", togglePanel); + root.getElementById("pending").addEventListener("click", () => drain()); for (const [id, tab] of [["tabAll", "all"], ["tabFav", "favorites"], ["tabArc", "archived"]]) { root.getElementById(id).addEventListener("click", () => { @@ -934,6 +935,11 @@ root.getElementById("panel").classList.toggle("open", panelOpen); root.getElementById("backdrop").classList.toggle("open", panelOpen); + // Silent while everything is synced; honest the moment something is stuck. + const pending = root.getElementById("pending"); + pending.hidden = queueCount() === 0; + pending.textContent = "⟳ " + queueCount() + " pending"; + // Context header for the current page. const ctx = root.getElementById("context"); ctx.innerHTML = ""; @@ -1132,6 +1138,7 @@ 🌐 Web Asura Demonic +
@@ -1192,6 +1199,8 @@ white-space: nowrap; } .chip:active { opacity: .8; } + .chip.pending { background: #4c1d95; border: none; cursor: pointer; } + .chip.pending[hidden] { display: none; } #context { padding: 12px 16px; border-bottom: 1px solid #33333d; display: flex; flex-direction: column; gap: 8px;