Closed rixx closed 3 months ago
Did you try this?:
{
"messages": [
{
"type": "set-extra-contents",
"place": "new-tab-button",
"contents": "85 tabs",
"windowId": 1 // <== windowI*d*, not windowI*D*
},
{
"type": "set-extra-contents",
"place": "new-tab-button",
"contents": "4 tabs",
"windowId": 10202 // <== windowI*d*, not windowI*D*
}
]
}
@piroor Oh, yeah, sorry, I'll edit my original post – I tried both spellings and forgot to update that.
You can try this for yourself by running:
browser.runtime.sendMessage('treestyletab@piro.sakura.ne.jp', {type: 'set-extra-contents', place: 'new-tab-button', contents: 'appearing on all button instances', windowId: 1})
Thanks, I forgot to check the target window ID...
This issue has been closed due to no response within 14 days after labeled as "fixed", 7 days after last reopened, and 7 days after last commented.
Abstract
I'm trying to put the number of tabs in the current window into the "new tab" button. However, all windows end up displaying the number of tabs in the last given window.
Steps to reproduce
You can see my code here. I'm sending a message like this:
However, both "new tab" buttons end up showing the latter message. I've verified that this happens if I send the messages individually instead of in an array, aswell.
Is this a limitation of Firefox or a bug in TST? It looks to me like setExtraNewTabButtonContents isn't attempting to read the passed
windowID
. I understood the documentation to say that passing awindowID
is allowed, is this not correct?Environment