Reader button in Safari for Touch Bar

Would it be possible to add the Reader button to the Touch Bar while in Safari?

Here you go.

This preset contains a simple button. I tried to create an Applescript Widget that would have changed the color if the Reader View is activated or not by using the following Applescript, but for any reason the returned result won't change until you open once the menu bar item "View" which is quite useless so :expressionless:

tell application "System Events"
tell process "Safari"
	return name of menu item 14 of menu "View" of menu bar item "View" of menu bar 1
end tell
end tell

Gotcha, thanks for trying

Use the “menu item” action.

Not sure what you mean. Triggering the Reader View is not a problem (I used the keyboard shortcut) but to get the state of the reader I'd check for the name of the menu item (Show Reader VS Hide Reader). But during my tests AppleScript does not update the menu bar item list unless the menu point is opened once. Which makes the whole thing quite damn useless :man_shrugging:t4:

Might want to try my menubar-toggling widget:

JSON:

[
  {
    "BTTWidgetName" : "Get Status of Menubar Item",
    "BTTTriggerType" : 639,
    "BTTTriggerTypeDescription" : "Apple Script Widget",
    "BTTTriggerClass" : "BTTTriggerTypeTouchBar",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTAutoAdaptActionToKeyboardLayout" : true,
    "BTTShortcutToSend" : "55,11",
    "BTTEnabled2" : 0,
    "BTTUUID" : "E21F563C-CD39-4D9B-A5CE-42A3F7BE2F57",
    "BTTNotesInsteadOfDescription" : 0,
    "BTTEnabled" : 1,
    "BTTModifierMode" : 0,
    "BTTOrder" : 18,
    "BTTDisplayOrder" : 0,
    "BTTMergeIntoTouchBarGroups" : 0,
    "BTTIconData" : "TU0AKgAAC0gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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1lXW2Ndc1+DYZNjo2WzZ8dp22vvbgNwF3IrdEN2W3hzeot8p36_gNuC94UThzOJT4tvjY+Pr5HPk_OWE5g3mlucf56noMui86Ubp0Opb6uXrcOv77IbtEe2c7ijutO9A78zwWPDl8XLx__KM8xnzp_Q09ML1UPXe9m32+_eK+Bn4qPk4+cf6V_rn+3f8B_yY_Sn9uv5L_tz_bf__",
    "BTTTriggerConfig" : {
      "BTTTouchBarOnlyShowIcon" : true,
      "BTTTouchBarItemPadding" : -10,
      "BTTTouchBarButtonColor" : "75.323769, 75.323769, 75.323769, 255.000000",
      "BTTTouchBarApplyCornerRadiusTo" : 1,
      "BTTTouchBarItemPlacement" : 0,
      "BTTTouchBarAppleScriptStringRunOnInit" : true,
      "BTTTouchBarAlwaysShowButton" : false,
      "BTTScriptType" : 0,
      "BTTTouchBarButtonWidth" : 100,
      "BTTTouchBarScriptUpdateInterval" : 0.5,
      "BTTTouchBarItemIconHeight" : 30,
      "BTTTouchBarButtonTextAlignment" : 0,
      "BTTTouchBarAlternateBackgroundColor" : "128.829533, 128.829533, 128.829533, 255.000000",
      "BTTTouchBarAppleScriptUsePath" : 0,
      "BTTTBWidgetWidth" : 400,
      "BTTTouchBarColorRegex" : "^✓",
      "BTTTouchBarItemIconWidth" : 30,
      "BTTTouchBarButtonName" : "Get Status of Menubar Item",
      "BTTTouchBarButtonFontSize" : 15,
      "BTTTouchBarAppleScriptString" : "tell application \"System Events\"\r\ttry\r\t\ttell application process \"Safari\"\r\t\t\tset state to value of attribute \"AXMenuItemMarkChar\" of menu item \"Show Reader\" of menu \"View\" of menu bar item \"View\" of menu bar 1\r\t\t\t\r\t\t\tif state is \"✓\" then\r\t\t\t\treturn \"✓\"\r\t\t\telse\r\t\t\t\treturn \" \"\r\t\t\tend if\r\t\tend tell\r\ton error\r\t\treturn \"err\"\r\tend try\rend tell",
      "BTTTouchBarButtonCornerRadius" : 6,
      "BTTTouchBarFreeSpaceAfterButton" : 1
    }
  }
]

Yes I'm quite familiar with this one :wink: The thing here is that the Reader Menu bar item isn't one to be toggled in Safari, but one which is present or not (don't know if this came with Catalina?). So I'll have to check which menu bar item is actually present to know the state of the reader. Or is there a smoother way to check for this than using the menu bar items? That would be great!

I found its workable but instead of taking the on / off from my script you take the on / error. Not best practice but it works enough i suppose

Another way is to double the script to:

if “Show Reader” is found set reader=true
if “Hide Reader” is found set reader=false

if reader=false
return off
else if reader=true
return on
end if

Imprint | Privacy Policy