53 Commits

Author SHA1 Message Date
dc31d21104 docs: add screenshots section to README with composed collage
Three-panel collage (popup, before, after) generated via Pillow script.
4:3 aspect ratio, 1200px max, gradient background with drop shadows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 03:09:55 -04:00
00507fe87c refactor: decompose CSS, unify dark mode, extract shared modules
Structural cleanup based on thermo-nuclear code quality review:
- Extract shared color-picker.css and color-popover.css from badges.css (611→85 lines)
- Extract shared lib/presets.js for preset CRUD used by popup and popover
- Unify dark mode to single applyDarkModeClass on <html>, removing 4 scattered functions
- Fix stale closure in startPostObserver, data-driven reload key check
- Remove dead exports, getHelpers wrapper, duplicated colorToHex
- Replace DOM expando properties with state array in popup.js

Net: -318 lines of duplication, no file over 401 lines.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 01:39:25 -04:00
80689c6f8d docs: add chat summary for housekeeping session
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 00:45:57 -04:00
e4093935b3 fix: unwrap LICENSE to match Gitea's MIT template format
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 00:44:02 -04:00
c0a0c157f5 chore: add LICENSE, README, VERSION, .editorconfig, expand .gitignore
Add project housekeeping files and sync manifest version to 0.1.0.
Also stages previously untracked chat summaries and score-ratio docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 00:27:54 -04:00
a13eca930c feat: card UI polish — voting pill, rank badge, selection, density
Rework card layout from flex to block flow for sidebar compatibility.
Add voting pill capsule with voted-state tinting (orange/purple),
rank badge watermark, custom rt-selected selection system replacing
Reddit/RES classes, density-responsive border radius, bold titles,
and comprehensive dark mode variants for all interactive states.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 15:55:10 -04:00
0eefcfc6cf chore: remove debug console.log from init
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 05:49:27 -04:00
074d234883 feat: add fontOverride toggle for Reddit Sans fonts
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 05:45:48 -04:00
4856520c38 feat: add fonts CSS with @font-face and override rules
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 05:43:46 -04:00
d7094495d3 feat: bundle Reddit Sans, Condensed, and Mono variable fonts
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 05:41:58 -04:00
b8ff27ef6e Add implementation plan for Reddit fonts override
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 05:40:06 -04:00
1c9d1e2705 Add design spec for Reddit fonts override feature
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 05:37:34 -04:00
6e2aec39c9 fix: use fresh settings in dark-mode observer and storage listener
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:18:48 -04:00
7b0c80c0a4 feat: add card layout controls to extension popup
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:15:40 -04:00
5521e39a66 feat: add card layout tweak with unified post observer
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:14:06 -04:00
95f0946e21 feat: add card CSS with shadcn design tokens
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:12:13 -04:00
8d3ff72f4f feat: add badgeLayout toggle, rename FOUC class to rt-badges-enabled
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:10:48 -04:00
7ac47b5c3c refactor: extract isDarkMode/getColorPrefix to settings.js as shared utilities
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:09:03 -04:00
d659238289 Add implementation plan for card layout feature
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 20:58:51 -04:00
cab7c61c07 Update card layout spec after adversarial review
- Move isDarkMode/getColorPrefix to settings.js as shared infra
- Add align-items: flex-start to #siteTable flex container
- Add width: 100% to .rt-card for flex-start compatibility
- Clarify scope: old.reddit.com only

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 20:55:08 -04:00
6c017f688d Add design spec for card layout: shadcn-style post cards
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 20:22:24 -04:00
37c142f6e6 fix: prevent page reload on color/preset saves
saveSettings() writes all keys including 'enabled', which triggered
the storage.onChanged reload check even when enabled didn't actually
change. Compare oldValue vs newValue so the reload only fires when
the enabled state genuinely toggles.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 18:17:33 -04:00
f78e60b723 fix: switch badge hover to opacity:0.8 (shadcn style)
shadcn/Radix badges use hover:bg-primary/80 to reduce opacity to 80%.
Apply the same pattern with opacity:0.8 for a subtle, clean hover.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 18:14:30 -04:00
b23af757a9 fix: use inset shadow darken for badge hover effect
Replace filter:brightness(1.1) with an inset box-shadow overlay
that subtly darkens only the background without washing out text
or border colors. Matches how GitHub/Bootstrap handle label hover.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 18:12:54 -04:00
48db2fc70e feat: add color presets + fix badge hover effect
- Add global color presets: save/apply/delete sets of {bg, border, text}
  colors as reusable presets, shown as mini badges in their own colors.
- Popover: preset badges under preview with + to save, click to apply,
  × on hover to delete.
- Popup: dedicated Color Presets section with same functionality,
  applying to light subreddit badge colors.
- Storage: colorPresets array added to settings defaults.
- Fix badge hover: change brightness(0.9) to brightness(1.1) so hover
  brightens (activates) instead of dimming.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 18:00:54 -04:00
fb0c03d46a fix: switch popover back to position:absolute with dynamic max-height
position:fixed pinned the popover to the viewport layer, so scrolling
the page could never reveal off-screen content. Revert to absolute
positioning (scrolls with the page) and dynamically compute max-height
based on available viewport space so the popover fits and scrolls
internally when content exceeds the available area.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:42:51 -04:00
d5f8c2e480 fix: stabilize popover positioning and prevent viewport overflow
- Switch popover from position:absolute to position:fixed to avoid
  scroll-offset math and simplify viewport clamping.
- Add max-height + overflow-y:auto so the popover scrolls internally
  instead of overflowing the viewport.
- Remove the reposition call after picker opens — this was causing
  the popover to flash and jump when the picker changed its height.
- Improve edge clamping: if neither above nor below fits, clamp to
  viewport bottom rather than flipping unpredictably.
- Remove the CSS arrow (::before) which was mispositioned when the
  popover appeared above the badge or near edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:26:12 -04:00
84621484da fix: reposition popover after picker opens, debounce popup saves
- Popover: call positionPopover() after opening the picker so the
  popover flips above the badge if it would clip the viewport bottom.
- Popup: debounce saveFromControls() calls during picker drag (200ms)
  to avoid dozens of storage writes per gesture.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:20:37 -04:00
1b4b5706de fix: mark per-subreddit mode dirty on color picker change
Without this, new subreddit entries would not persist their color
overrides because _dirtyModes was never set when picking via the
custom color picker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:17:16 -04:00
2abb71fbb8 feat: integrate tabbed color picker into extension popup
Replace native color inputs with swatch divs wired to the shared
tabbed picker widget for global and per-subreddit color controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:16:00 -04:00
d26f133efb feat: integrate tabbed color picker into inline popover
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:14:02 -04:00
a3567005bd feat: add tabbed color picker widget (palette, named colors, custom HSV)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:11:53 -04:00
2707f3522c feat: animate gear icon reveal on badge hover
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:09:44 -04:00
2abd18e7b2 Add design spec for badge polish: gear animation + custom color picker
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:35:13 -04:00
b9bb1d6433 docs: add chat summary for inline color popover implementation
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:17:10 -04:00
210676e65b fix: only persist edited/existing mode overrides, refresh popover theme on dark mode toggle
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:11:24 -04:00
dd92ce8f0a fix: subreddit entry flex layout for stacked mode-aware structure
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:08:30 -04:00
565f039bc5 feat: popup per-subreddit overrides with mode-aware light/dark toggle
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:07:07 -04:00
4385cc1c28 feat: inline color popover with mode toggle, live preview, and save/reset
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:04:48 -04:00
1da061f12d feat: gear icon on subreddit badges and popover CSS
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:02:57 -04:00
af7afde592 feat: mode-aware subreddit color overrides with v1→v2 migration
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:00:52 -04:00
6bf79351a7 Add implementation plan for inline subreddit color popover
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:58:43 -04:00
b8f7a96715 Harden spec after adversarial review
Address six gaps found during review:
- Fix subreddit name extraction bug (gear icon text in textContent)
- Prevent gear icon layout shift via absolute positioning
- Handle native color picker dialog in click-outside detection
- Make per-subreddit overrides mode-aware (light/dark)
- Replace badge hover opacity with filter: brightness
- Split popover logic into separate file

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:54:08 -04:00
49b7d471b6 Add design spec for inline subreddit color popover
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:44:31 -04:00
cca7940dd9 fix: subreddit badge fill, tagline 'to' cleanup, and comments li spacing
- Default subreddit badge background from transparent to opaque fill
  (light: #fde8e0, dark: #3d2518) so page highlights don't bleed through
- Remove lingering "to" text node from tagline when subreddit is hidden
- Hide the <li> wrapping the comments link (not just the <a>) to
  eliminate leftover whitespace in the flat-list
- Simplify popup: subreddit bg fields are now color pickers (no longer
  need transparent text-input workaround)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:32:33 -04:00
8be62e1fec fix: disabled-state UI, settings shallow-merge, and popup save reliability
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:05:48 -04:00
46d008d339 feat: settings popup with color pickers, dark mode, and subreddit overrides
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:02:46 -04:00
6cedae7a2c feat: badge DOM manipulation with MutationObservers and dark mode detection
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:00:49 -04:00
5d2a4afc98 feat: badge CSS with light/dark mode, custom properties, and FOUC prevention
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 14:59:01 -04:00
ddc47bfdcc feat: extension skeleton with manifest, settings module, and placeholder icons
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 14:57:11 -04:00