Skip to content

Conversation

@thedorekaczynski
Copy link

@thedorekaczynski thedorekaczynski commented Dec 16, 2025

Previously the “copy links as” preference was read from a cached variable, so users had to refresh the page to see a change.

This patch makes scripts/tweetviewer.js and scripts/helpers.js fetch the value directly from storage every time a user copies a link, guaranteeing the latest setting is used even on cached pages.

I also added a small text display next to the dropdown to show what custom value/site you have set; previously the only indicator was the ambiguous “custom” label in the dropdown.

- Fix cancel handling to restore previous value when prompt is cancelled
- Add display of custom domain value next to the select dropdown
- Properly update select state when custom value is saved
- Add vars.copyLinksAs update (note: still requires page reload to take effect)
Read copyLinksAs directly from storage when copying links instead of using cached vars value. This ensures the setting takes effect immediately across all pages without requiring a page reload.

- Update copy link handlers in tweetviewer.js and helpers.js to read from chrome.storage.sync
- Fallback to vars.copyLinksAs or 'twitter.com' if storage read fails
- Fixes limitation mentioned in previous commit where page reload was required
Remove verbose cancellation handling and unnecessary defensive checks.
Simplify variable naming to avoid shadowing in copy link handlers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant