danreeves / dt-exchange

40 stars 17 forks source link

Clicking the extension no longer opens a new tab #17

Closed Coconutcoo closed 1 year ago

Coconutcoo commented 1 year ago

I'm using v1.2, on FF 108.0.1 with anything popup blocking related disabled, and clicking the button no longer opens a new tab.

I suspect https://github.com/danreeves/dt-exchange/blob/main/src/background.ts#L5 should be

  ext.tabs.create({url: dashboardUrl});

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create suggests that the "create" function doesn't need the tabs permission, only reading existing data does.

danreeves commented 1 year ago

Ugh, the differences between chrome and firefox 😓

Thanks for reporting

Coconutcoo commented 1 year ago

Chrome's docs say the same thing for this call - https://developer.chrome.com/docs/extensions/reference/tabs/#perms

I haven't tried the fix on Chrome, I'll do that now and report back

Coconutcoo commented 1 year ago

Appears to work with just ext.tabs.create on both - in this case I guess the browsers are identical, just a little unintuitive that losing tabs permission still lets you call most of the tabs.* functions