Skip to content

Keyboard shortcut for pinning/unpinning tab #370

@isshin1

Description

@isshin1

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions