aminomancer / uc.css.js

A dark indigo CSS theme for Firefox and a large collection of privileged scripts to add new buttons, menus, and behaviors and eliminate nuisances. The theme is similar to other userChrome stylesheets, but it's intended for use with an autoconfig loader like fx-autoconfig, since it uses JavaScript to implement its more functional features.
Other
329 stars 27 forks source link

TabPreview.uc.js #29

Closed kaos-55 closed 2 years ago

kaos-55 commented 2 years ago

Hi @aminomancer I recently found your repository and saw that it is possible to add some features to Firefox through javascripts (userchromejs). I am currently using the private tab script as there is no extension that provides such a feature.

Searching the web for a replacement for the tab scope extension that allows thumbnails on tabs I did not find anything similar. Is there a possibility that a script could be written to show thumbnails on tabs? If so, could this script I found on the web be ported to work with the latest version of Firefox?

TabPreview.zip

aminomancer commented 2 years ago

Sure, does this work for you?

kaos-55 commented 2 years ago

Oh thank you so much. I have been testing the script and I have noticed that in some pages that use long titles the thumbnail shows an empty space, I upload some examples. Besides that it works well. tabthumb tabthumb1 tabthumb2

aminomancer commented 2 years ago

So what do you think it should do instead? To avoid any empty space, I either need to 1) limit the max width of the label, making it wrap onto multiple lines or just overflow and terminate in a ... ellipsis; or 2) unlimit the max height of the thumbnail, which might get out of control.

aminomancer commented 2 years ago

Alright I ended up letting the label wrap onto multiple lines, so try updating to v1.0.1. I also changed the aspect ratio to 16:9 fwiw

silverwings15 commented 2 years ago

very cool idea. is there any way TST compatibility could be added like with the old extension?

aminomancer commented 2 years ago

very cool idea. is there any way TST compatibility could be added like with the old extension?

I don't know which extension you're talking about. I never used old Firefox extensions. But anyway, that would probably be a bit involved. Might even require rebuilding TST in a different format. Strictly speaking it is possible to use JSActors in the webext-browsers message manager group to send information from the content to the chrome window. But idk how much information will even be exposed to the child actor running in the sidebar. That is one of the reasons I made the vertical tabs pane script, so that everything would be in the chrome window, in the parent process.

silverwings15 commented 2 years ago

oh, i meant the old Tab Scope extension from which the idea for this script was derived. i should ask about it on the TST side and see what they think. your vertical tabs pane is great, but sadly it lacks the litany of helper addons that make TST so robust in functionality

aminomancer commented 2 years ago

yeah there are trade-offs to everything

kaos-55 commented 2 years ago

Awesome, it works and looks great, it's perfect. Once again thank you very much for your work, you managed to bring back one of the features lost in Firefox when it removed its extensions in favor of webextensions. I think this issue can be closed. thumb1