thepante / alfs-firefox Goto Github PK
View Code? Open in Web Editor NEWAlways Loaded Floating Sidebar it's a small modification for Firefox
Always Loaded Floating Sidebar it's a small modification for Firefox
I reverted back to an earlier version and make it simple as possible for use with the keyboard. The main difference is to use the Alt-J
for toggling it.
Here is the Javascript and CSS for them.
Javascript - https://gist.github.com/vonHabsi/57f95e37102b4272a4755392e64ee50e
CSS - https://gist.github.com/vonHabsi/d2c7cbe01bca8cb4c3dbcd97d532f985
Appearance when sidebar is hidden - content is shifted off screen.
What CSS and Javascript is required? Is there some way to check the CSS used in Firefox itself when the sidebar is hidden, then adjust the hiding to match the same CSS? The CSS for displaying it seems perfectly normal
I have discovered a bug when it is placed on the left.
It seems that although hiding it changes the opacity to 0, but does not remove it or relocate it. So when a link on the page underneath it is clicked, the actual item clicked is the item in the sidebar which is at the same position but invisible.
This is evident when you pass the cursor over links where the hidden sidebar is. You will see that the cursor does not change when it passes over a link, and the URL does not display at the bottom of the page.
A more obvious is symptom is that TST displays the contents of a collapsed tree in a popup when the cursor hovers over the tab for a few seconds, meaning that sidebar is still present but only transparent.
The line alfs.hidden=false
at https://github.com/thepante/alfs-firefox/blob/master/alfs.uc.js#L30 appears to be the culprit, but changing it to alfs.hidden=true
results in the recreation of the TST contents when it is shown again, so I'm assuming that setting it to true
destroys the TST contents.
My CSS of knowledge is limited but could the line margin-right: calc(-100vh * 0.4);
in the .closeit
CSS be a bug as well?. I don't know much about CSS, but perhaps that code does not allow for the sidebar being on the left.
.closeit {
opacity: 0;
box-shadow: none !important;
margin-right: calc(-100vh * 0.4);
transition-property: opacity;
transition-duration: 0.15s !important;
}
I assume that the negative margin-right value moves it off screen when it is on the right-side, but doesn't work when it is on the left. Perhaps display: none
may be better?
After using it for a while I have found that the original behaviour is probably the best for my way of browsing, in conjunction with a keyboard shortcut to hide it and display.
In the default behaviour the sidebar occupies part of the content area instead of floating on top of it. How can that original behaviour be restored, but without having to recreate the TST contents?
I have tried the latest build #c814f12 and it doesn't work. #58504bf also exhibited the same problem.
The sidebar contents are empty and the icons and menu items above the sidebar when it is on the left side are cannot be clicked with the mouse. One has to access the menu items with the keyboard when that happens.
A recent update in Firefox Nightly seems to have broken the code.
It still works in Firefox Stable.
I have left a made a post on r/FirefoxCSS about it
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.