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

Keyboard shortcut for pinning/unpinning tab #370

Closed
Iss-in opened this issue Apr 1, 2021 · 1 comment
Closed

Keyboard shortcut for pinning/unpinning tab #370

Iss-in opened this issue Apr 1, 2021 · 1 comment

Comments

@Iss-in
Copy link

Iss-in commented Apr 1, 2021

Description

It will be really nice to have a keyboard shortcut for this , I used to have another extension for this specific task, but somewhy on pinning the tab, sideberry automatically get switched to first panel from current panel after pinning the tab.

  chrome.commands.onCommand.addListener(function(action) {

  if (action == "toggle-pin-tab") {

    chrome.tabs.query({currentWindow: true, active: true,}, function(foundTabs) {

      var currentTabId = foundTabs[0].id

      chrome.tabs.get(currentTabId, function(currentTab){

        const toggledValue = !currentTab.pinned;

        chrome.tabs.update(currentTabId, {pinned: toggledValue});

      });

    });

  }

});

this is the basic code used by the extension, if it helps

edit : it might be a bug instead, even simple pinning of tab by dragging or via context menu is bringing me to first panel after pinning operation

@mbnuqw
Copy link
Owner

mbnuqw commented Sep 29, 2023

Resolved in v5.0.0

@mbnuqw mbnuqw closed this as completed Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants