Skip to content

Commit 414d651

Browse files
committed
fix: unify all popup links to open at end of tab strip
1 parent ca34293 commit 414d651

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/popup/popup.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,15 @@ settingsLogoutBtn.addEventListener("click", logout);
10611061
refreshBtn.addEventListener("click", refresh);
10621062
markAllBtn.addEventListener("click", markAllAsRead);
10631063

1064+
// Open GitHub Notifications via tabs.create for consistent tab placement
1065+
// Intercept all external links to open at the end of the tab strip
1066+
document.addEventListener("click", (e) => {
1067+
const link = e.target.closest('a[target="_blank"]');
1068+
if (!link) return;
1069+
e.preventDefault();
1070+
tabs.create({ url: link.href });
1071+
});
1072+
10641073
// Listen for storage changes to auto-update the notification list
10651074
// This handles updates from background refresh or other sources
10661075
browserStorage.onChanged.addListener((changes, areaName) => {

0 commit comments

Comments
 (0)