Skip to content

v0.1.6

Choose a tag to compare

@cannolis cannolis released this 10 May 03:08
· 3 commits to main since this release

ZotRead v0.1.6 — dark mode + reliable pane auto-follow

Two issues fixed

1. Text invisible in dark mode

The WhyRead sidebar pane hardcoded color: #333 / #555 / #666 everywhere — readable on white, near-invisible on a dark theme. All hardcoded greys are gone; the pane now inherits the parent's theme color and uses opacity: 0.6/0.7/0.8/0.95 to differentiate emphasis levels. Works on both light and dark Zotero.

2. Auto-follow ZotRead pane when navigating items

Earlier versions tried to detect "is the user looking at ZotRead?" by calling getBoundingClientRect synchronously inside onItemChange. That doesn't work on Zotero 9 because Zotero resets the item-pane scroll before firing onItemChange — so the snapshot always saw "not visible" and the auto-follow never fired.

Replaced with an IntersectionObserver attached to the section element on onRender. The observer's last-reported state reflects the user's actual most-recent visibility, not the post-reset state. So:

  • Open ZotRead and read it → userPrefersZotRead = true → next item navigation auto-scrolls back to ZotRead
  • Scroll away to Info / Abstract / Tags → observer reports isIntersecting = false → next navigation doesn't drag you back
  • Collapse ZotRead section header → also drops the flag, observer is gated on section.open

Install

Same routine — download zot-read.xpi from this release, Tools → Add-ons → gear icon → Install Add-on From File….