banthagroup / fslightbox

An easy to use vanilla JavaScript plug-in without production dependencies for displaying images, videos, or, through custom sources, anything you want in a clean overlying box.
MIT License
349 stars 30 forks source link

Disable any button from the toolbar #156

Open MathieuAlphamosa opened 3 years ago

MathieuAlphamosa commented 3 years ago

If I'm right the only button we can disable is the Thumb button. As an example, I would like to disable the Fullscreen button as it's particularly relevant in my use case and can confuse users.

oualidmaz commented 3 years ago

I was able to disable fullscreen button by using global CSS like so :

.fslightbox-toolbar-button:first-child {
  display: none !important;
}
obouchari commented 5 months ago

Or to be more specific:

.fslightbox-toolbar-button[title='Enter fullscreen'] {
    display: none !important;
}