Skip to content

web: Open new tabs beside the current one by extension#23313

Draft
pzhlkj6612 wants to merge 1 commit intoruffle-rs:masterfrom
pzhlkj6612:feat/open-new-tabs-beside-current-one
Draft

web: Open new tabs beside the current one by extension#23313
pzhlkj6612 wants to merge 1 commit intoruffle-rs:masterfrom
pzhlkj6612:feat/open-new-tabs-beside-current-one

Conversation

@pzhlkj6612
Copy link
Copy Markdown

Hello! Thanks for maintaining Ruffle. I can't always go back to my childhood to play old games without your hard work.

The logic about opening new tabs in the browser extension can be improved. I have so many tabs open. New ones opened by Ruffle always go to the end of the looooong tab list. I asked AI and have modified the code to let new tabs open beside the current one.

I'm not able to test the "onboard.html" page because I can't find a way to trigger the "INSTALL" event with unpacked extension. In Firefox Nightly, installing XPI file with setting xpinstall.signatures.required to false does not work. I can't figure it out.

The two changes about "player.html" have been tested, though.

Here is the commit message:

* Changes:
    * Open new tabs beside the current tab instead of at default position (after all tabs).
    * Remove redundant "promisify" wrapper from "tabs.create" calls.
* Test Environment:
    * Windows 11, Firefox 143.0.
    * Windows 11, Chrome 146.0.7680.80.

Please review, thank you!

* Changes:
    * Open new tabs beside the current tab instead of at default position (after all tabs).
    * Remove redundant "promisify" wrapper from "tabs.create" calls.
* Test Environment:
    * Windows 11, Firefox 143.0.
    * Windows 11, Chrome 146.0.7680.80.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pzhlkj6612 <29089388+pzhlkj6612@users.noreply.github.com>
@danielhjacobs danielhjacobs added A-web Area: Web & Extensions extension Related to the Ruffle WebExtension T-feature Type: New Feature (that Flash doesn't have) labels Mar 22, 2026
@kjarosh kjarosh added the llm The PR contains mostly LLM-generated code label Apr 4, 2026
Copy link
Copy Markdown
Collaborator

@evilpie evilpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of setting the index, you should set the openerTabId to the right tab. In Firefox at least this will automatically open the new tab after the current tab. This behaviour is actually controllable by the user using the about:config preference browser.tabs.insertRelatedAfterCurrent.

@pzhlkj6612 pzhlkj6612 marked this pull request as draft April 11, 2026 09:14
@pzhlkj6612
Copy link
Copy Markdown
Author

Instead of setting the index, you should set the openerTabId to the right tab. ...

Thank you, I didn't know that parameter. Let me check a better appraoch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-web Area: Web & Extensions extension Related to the Ruffle WebExtension llm The PR contains mostly LLM-generated code T-feature Type: New Feature (that Flash doesn't have)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants