Hotkey to "Hide Distracting Items..." in Safari

I use the "Hide Distracting Items" function in Safari a lot but unfortunately its not available as a menu item. I tried to use "Click a button" action as well but seems the action was registering as a right-click and not a regular click.

Any other ideas as to how to create a macro for this?

Thanks!

If you show your macro I might spot if it contains an error. In any case, I like your problem and I created a solution. In this solution, the actions that I coloured yellow are actions that you will have to customize based on your screen resolution, light/dark mode, etc. Since you will need to customize this macro, I won't upload it, I will simply show a screen shot below... (the semaphore is simply to prevent this macro from running twice at the same time)


1 Like

Thanks for the insights, Airy

You are welcome. It's not perfect code, but it should work.

Using the "Select or Show a Menu Item" action seems to work great.

I also added a toggle functionality

Unfortunately, Reader view isn't the same thing as "Hide Distracting Items...".

Nope -- but (and colour me surprised!) the widget it's hiding under is seen as a button by KM! So we can hit it with a combo of button press and image detection:

Safari Distraction Demo.kmmacros (51.7 KB)

You'll probably have to set your own image -- be quick so it doesn't trigger highlighting when you drag over it!

Fun fact -- the pop over doesn't seem to be picked up as part of "the front window" for image detection, hence using an area instead.