Enable sidebar for firefox#889
Conversation
|
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? |
|
Holy crap nice find, can't believe I missed this all this time lol |
killergerbah
left a comment
There was a problem hiding this comment.
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
isFirefoxanywhere and deal with any sidepanel-related code that shows up.
I'm also happy to do this if you'd prefer
de45cf4 to
5a9a6ca
Compare
It would probably be easier for you to do this as I am very inexperienced. I fixed the mistakes I made regarding the config and amended the changes to the previous commit. |
|
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. You should be very proud of what you created, thank you very much for your work! |
Multiple people have said this so I'll see if i can do it.
I really appreciate this, keeps me going |
|
Huge contribution, thank you so much 🙏 |
Huge contribution, thank you so much 🙏
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.