Skip to content

Add LINKS_NEW_TAB option to open links in a new tab#5

Merged
maxhollmann merged 1 commit into
masterfrom
feature/open-links-in-new-tab
May 21, 2026
Merged

Add LINKS_NEW_TAB option to open links in a new tab#5
maxhollmann merged 1 commit into
masterfrom
feature/open-links-in-new-tab

Conversation

@maxhollmann

Copy link
Copy Markdown
Owner

Closes #2

Summary

  • Adds a LINKS_NEW_TAB env var (accepts true or 1) that makes all links open in a new browser tab
  • Keyboard navigation (Enter/Space) also respects this setting via window.open
  • rel="noopener noreferrer" is set automatically when new-tab mode is on

Usage

environment:
  LINKS_NEW_TAB: "true"

Test plan

  • Default behavior unchanged (links open in same tab) when LINKS_NEW_TAB is not set
  • LINKS_NEW_TAB=true makes clicked links open in a new tab
  • LINKS_NEW_TAB=1 also works
  • Keyboard Enter/Space navigation opens in a new tab when option is set

🤖 Generated with Claude Code

@vercel

vercel Bot commented May 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
envlinks-demo Ready Ready Preview, Comment May 21, 2026 5:07pm

Set LINKS_NEW_TAB=true (or 1) to make all links and keyboard
navigation open in a new tab instead of the current tab.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@maxhollmann maxhollmann force-pushed the feature/open-links-in-new-tab branch from 53941ff to 9fdc641 Compare May 21, 2026 17:07
@maxhollmann maxhollmann merged commit 9fd4b1a into master May 21, 2026
4 checks passed
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.

Option to open links in new tab rather than same tab?

1 participant