I use TreeStyleTab and I want to use the keyboard to scroll the TST sidebar. The message to do that requires the number of the window which is usually 1. When you open more windows how do you determine the window number of the current window?
Currently when I am in a different window and press the shortcut it is the sidebar of the first window that scrolls
mapkey("<Ctrl-[>", "scroll sidebar up", function () {
console.log("scroll up");
browser.runtime.sendMessage('treestyletab@piro.sakura.ne.jp', {
type: 'scroll',
window: 1,
delta: -100,
});
});
PS. I also need the same info for tabs, because some commands need the tab’s id.