Mac: reloading document in Chrome or Firefox?

后端 未结 4 1894
野趣味
野趣味 2020-12-28 22:52

How can I tell Chrome or Firefox to reload the document in the top window? Here\'s what I\'m using for Safari:

osascript -e \'
    tell application \"Safari         


        
4条回答
  •  清歌不尽
    2020-12-28 23:46

    Automator

    • Open Automator and choose a New Document
    • Choose Service

    A screengrab showing the document type dialog in Automator

    • Set Service receives to no input
    • Choose Run AppleScript action from the action list.
    • Paste the following code in the script:

     

    tell application "Google Chrome" to tell the active tab of its first window
    reload
    end tell
    

    A screengrab showing the automator window actions

    • Save the the service, for example, using the name Chrome Refresh

    System Preferences

    • Open System Preferences > Keyboard
    • In the Shortcuts tab, choose Services
    • Assign a new shortcut

    A screengrab showing System Preferences keyboard shortcut tab

提交回复
热议问题