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

Add new background script handler to move arbitrary tabs #1730

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jackmac92
Copy link

@jackmac92 jackmac92 commented Apr 16, 2022

I wanted to add a custom shortcut to move all tabs, which meet X criteria, to the left side of the tab bar.
But I wasn't able to do so with the existing RUNTIME handlers, since they largely rely on moving the active tab.

Didn't spend much time on the API for this handler yet, open to suggestions if you have any

Currently it expects a Array of 2 item arrays [tabId, moveParams] *

api.RUNTIME("moveTabs", [
  [tabId1, { index: -1 }]
])

where moveParams is passed directly as the second arg to chrome.tabs.move for maximum flexibility

* pseudo "tuples", maybe this should be an object, just seemed slightly more confusing as an object with regard to what was passed as the second argument to chrome.tabs.move

@jackmac92 jackmac92 changed the title Move arbitrary tabs with RUNTIME("moveTabs") Add new background script handler to move arbitrary tabs Apr 18, 2022
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.

None yet

1 participant