Skip to content

Enable sidebar for firefox#889

Merged
killergerbah merged 1 commit intokillergerbah:mainfrom
Hit2Skill:firefox-sidebar
Feb 23, 2026
Merged

Enable sidebar for firefox#889
killergerbah merged 1 commit intokillergerbah:mainfrom
Hit2Skill:firefox-sidebar

Conversation

@Hit2Skill
Copy link
Copy Markdown
Contributor

@Hit2Skill Hit2Skill commented Feb 21, 2026

Everything I tried seems to work out of the box just with this small config change.

I am still looking into why the sidebar does not get any icon.

@Hit2Skill
Copy link
Copy Markdown
Contributor Author

It looks like wxt is removing the default_icon during compilation, the manifest within about:debugging does not include any default_icon field.

{"manifest_version":2,"name":"asbplayer: Language-learning with subtitles","description":"__MSG_extensionDescription__","version":"1.14.0","icons":{"16":"icon/icon16.png","32":"icon/icon32.png","48":"icon/icon48.png","64":"icon/icon64.png","128":"icon/icon128.png"},"default_locale":"en","web_accessible_resources":["chunks/*","fonts/*","asbplayer-locales/*","icon/image.png","netflix-page.js","youtube-page.js","stremio-page.js","tver-page.js","bandai-channel-page.js","amazon-prime-page.js","hulu-page.js","iwanttfc-page.js","disney-plus-page.js","apps-disney-plus-page.js","viki-page.js","unext-page.js","emby-jellyfin-page.js","osnplus-page.js","bilibili-page.js","nrk-tv-page.js","plex-page.js","areena-yle-page.js","hbo-max-page.js","cijapanese-page.js","anki-ui.js","mp3-encoder-worker.js","pgs-parser-worker.js","video-data-sync-ui.js","video-select-ui.js","notification-ui.js","mobile-video-overlay-ui.html","page-favicons/*"],"sidebar_action":{"default_panel":"sidepanel.html","default_title":"asbplayer"},"commands":{"copy-subtitle":{"description":"__MSG_shortcutMineSubtitleDescription__"},"copy-subtitle-with-dialog":{"suggested_key":{"default":"Ctrl+Shift+X","mac":"MacCtrl+Shift+X"},"description":"__MSG_shortcutMineSubtitleAndOpenDialogDescription__"},"update-last-card":{"suggested_key":{"default":"Ctrl+Shift+U","mac":"MacCtrl+Shift+U"},"description":"__MSG_shortcutUpdateLastCardDescription__"},"toggle-video-select":{"suggested_key":{"default":"Ctrl+Shift+F","mac":"MacCtrl+Shift+F"},"description":"__MSG_shortcutSelectSubtitleTrackDescription__"},"export-card":{"description":"__MSG_shortcutExportCardDescription__"},"take-screenshot":{"suggested_key":{"default":"Ctrl+Shift+V","mac":"MacCtrl+Shift+V"},"description":"__MSG_shortcutTakeScreenshotDescription__"},"toggle-recording":{"description":"__MSG_shortcutToggleRecordingDescription__"}},"browser_specific_settings":{"gecko":{"id":"{e4b27483-2e73-4762-b2ec-8d988a143a40}","update_url":"https://killergerbah.github.io/asbplayer/firefox-extension-updates.json"}},"permissions":["tabs","storage","unlimitedStorage","contextMenus","webRequest","webRequestBlocking","clipboardWrite","<all_urls>"],"background":{"scripts":["background.js"]},"options_ui":{"open_in_tab":true,"page":"options.html"},"content_scripts":[{"matches":["*://app.asbplayer.dev/*","*://killergerbah.github.io/asbplayer*"],"all_frames":true,"run_at":"document_start","js":["content-scripts/asbplayer.js"]},{"matches":["<all_urls>"],"all_frames":true,"exclude_globs":["*://app.asbplayer.dev/*","*://killergerbah.github.io/asbplayer*"],"run_at":"document_start","js":["content-scripts/page.js"]},{"matches":["<all_urls>"],"all_frames":true,"exclude_globs":["*://app.asbplayer.dev/*","*://killergerbah.github.io/asbplayer*"],"run_at":"document_idle","css":["content-scripts/video.css"],"js":["content-scripts/video.js"]}],"browser_action":{"default_title":"asbplayer"}}

Any ideas on what I could try to resolve this?
I was struggling with wxt for a while and just enabling the sidebar took me longer than I would like to admit, because I missed the meta tag in sidepanel/index.html

@killergerbah
Copy link
Copy Markdown
Owner

Holy crap nice find, can't believe I missed this all this time lol

Copy link
Copy Markdown
Owner

@killergerbah killergerbah left a comment

Choose a reason for hiding this comment

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

You'll also want to enable all sidepanel related UI with this diff:

  • Button needs to be shown in extension popup
  • Keyboard shortcut needs to be shown as well
  • Anywhere we open the side panel, the Firefox method should be used: sidebarAction.open() . Instead of using if else branching everywhere I would suggest extracting that logic into a reusable function.
  • To be exhaustive, could search for isFirefox anywhere and deal with any sidepanel-related code that shows up.

I'm also happy to do this if you'd prefer

@Hit2Skill
Copy link
Copy Markdown
Contributor Author

You'll also want to enable all sidepanel related UI with this diff:

* Button needs to be shown in extension popup

* Keyboard shortcut needs to be shown as well

* Anywhere we open the side panel, the Firefox method should be used: [sidebarAction.open()](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/sidebarAction/open) . Instead of using if  else branching everywhere I would suggest extracting that logic into a reusable function.

* To be exhaustive, could search for `isFirefox` anywhere and deal with any sidepanel-related code that shows up.

I'm also happy to do this if you'd prefer

It would probably be easier for you to do this as I am very inexperienced.
There seems to be some odd behaviour for the pretty command on my Windows machine.
I am not sure if that will cause issues once you run the command again on your side, it is currently formatting all the files for me and doesn't seem to solve obvious issues such as wrong indentations.

I fixed the mistakes I made regarding the config and amended the changes to the previous commit.
Building the extension for firefox now shows the icon in the sidebar and does not open it upon install.

@Hit2Skill
Copy link
Copy Markdown
Contributor Author

On an unrelated note I would like to encourage you to add the extension in the firefox add-on store and see if you can get the unoffical one removed.
Regardless of the feature differences it is a very valuable tool for language learners and many might take a wrong turn and accidentally pick up the unoffical one currently in the firefox add-on store.

You should be very proud of what you created, thank you very much for your work!

@killergerbah
Copy link
Copy Markdown
Owner

On an unrelated note I would like to encourage you to add the extension in the firefox add-on store and see if you can get the unoffical one removed.

Multiple people have said this so I'll see if i can do it.

You should be very proud of what you created, thank you very much for your work!

I really appreciate this, keeps me going

@killergerbah killergerbah merged commit 2e92f7a into killergerbah:main Feb 23, 2026
@killergerbah
Copy link
Copy Markdown
Owner

Huge contribution, thank you so much 🙏

@killergerbah killergerbah added this to the Extension v1.14.0 milestone Feb 23, 2026
khajiitvaper2017 pushed a commit to khajiitvaper2017/asbplayer that referenced this pull request Mar 1, 2026
Huge contribution, thank you so much 🙏
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants