Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default tab position configurable #13

Open
danielnixon opened this issue Apr 3, 2019 · 2 comments
Open

Make default tab position configurable #13

danielnixon opened this issue Apr 3, 2019 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@danielnixon
Copy link
Owner

danielnixon commented Apr 3, 2019

This add-on will respect the value of Firefox's newTabPosition if it's available. If it's not available, this add-on will fall back on relatedAfterCurrent, which happens to be the default value of that setting. There is no such equivalent setting available in Chrome that is exposed to add-on authors (that I'm aware of). I recommend you use Firefox (for all sorts of reasons).

If we added an add-on setting for this value, it would work everywhere (including Chrome and earlier versions of Firefox).

@danielnixon
Copy link
Owner Author

@assiless
Copy link

assiless commented Mar 22, 2023

I've patched it like this, and I've got a good user experience

diff --git a/background-script.js b/background-script.js
index a9b19fe..0177f64 100644
--- a/background-script.js
+++ b/background-script.js
@@ -84,7 +84,7 @@ const tabPositions = {
     const lastTabOpenedBySenderTab = last(tabsOpenedBySenderTab);
     return lastTabOpenedBySenderTab !== undefined
       ? lastTabOpenedBySenderTab.index + 1
-      : undefined;
+      : senderTab.index + 1;
   },
   /**
    * @param {chrome.tabs.Tab} senderTab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants