wmstack / Zotero-Toggle-Bars

A plugin that enables you to toggle various bars in Zotero
BSD 2-Clause "Simplified" License
6 stars 0 forks source link

Add Toggle Top Bar #3

Open gitsroid opened 1 month ago

gitsroid commented 1 month ago

I would like to hide the top bar (where you have "File Edit View ... Close button")

wmstack commented 1 month ago

Oh, the reason that this has not been implemented, is:

  1. I use Mac OS, and I don't actually have a top bar (all applications put their menu items in the global menu bar which I can autohide in Mac).
  2. I can assign shortcuts to the menu bar items using System Keyboard Shortcuts. image
image

Therefore the extension does hide all the bars in Mac OS. This is the reason why I haven't considered the top bar. I was suspecting that this could become problematic for Windows users. I don't know how to actually do it as I don't really have access to a Windows computer.

In theory it shouldn't be difficult to actually implement, though depending on how Zotero works on Windows. If you want to try to do it, then go to the Zotero JS Error console, and try to get access to the window's document element. The chrome dev-tools should come in handy. You should be able to find the top bar and toggle its display to hidden and see if that works. Once you are able to achieve it in the JS Error console, it should be straight-forward to add it to the add-on.

The shortcuts are definitely possible though.

gitsroid commented 1 month ago

Ok, thanks for the shortcuts!

Well, that is exactly the appearance I am searching for! Currently I am using linux, so I suppose you could reproduce the top bar in any linux distro.

I have no idea about working with the Zotero JS Error console. If someday you take the time to reproduce it in linux let me know!

wmstack commented 1 month ago

Okay I have added the shortcut keys Ctrl + T, Ctrl + B and Ctrl + A for toggling the various bars. I have also published a new release, which, maybe I ought to have waited for your feedback first.

gitsroid commented 4 weeks ago

Perfect! It works.