Jump to content

Recommended Posts

Go Home, Alfred

An Alfred workflow which enables you to use a keyboard shortcut to go to the homepage of a website you are on.

 

Do you often get stuck deep inside the rabbit hole (of a website) and come out by either 

  • backspacing the URL a gazillion times to go to the home page 
  • or by clicking the website logo usually on the top left

UGHH! make it a keyboard shortcut with this Alfred workflow!

Install

P.S.: You need to buy the Powerpack to use this workflow.

Supported Browsers

  • Safari
  • Google Chrome
  • Google Chrome Canary
  • Opera
  • Vivaldi
  • Brave Browser

Note

  • Firefox not supported, for now, sorry! This is why.
  • Please reach out if you need other Chrome/Safari based browsers supported.
Edited by Vinay W
updated description, prettier formatting
Link to post

Hello @Vinay W,

 

I think it is useful but It doesn't work for me, I am on 10.15.4 Catalina and Alfred 4.0.9. You can find the debug output below.

 

[18:05:44.281] Logging Started...

[18:06:53.448] Logging Stopped.

[18:07:06.138] Logging Started...

[18:07:14.181] Go Home, Alfred[Hotkey] Processing complete

[18:07:14.184] Go Home, Alfred[Hotkey] Passing output '' to Run Script

[18:07:14.485] ERROR: Go Home, Alfred[Run Script] /Users/Ceyhun/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/5D846426-16B8-4DB6-A297-81C52F673BEF:261:264: script error: Expected end of line but found property. (-2741)

[18:07:14.488] Go Home, Alfred[Run Script] Processing complete

[18:07:14.489] Go Home, Alfred[Run Script] Passing output '' to Run Script

[18:07:14.560] Go Home, Alfred[Run Script] Processing complete

[18:07:14.564] Go Home, Alfred[Run Script] Passing output 'https://

' to Run Script

[18:07:14.829] ERROR: Go Home, Alfred[Run Script] /Users/Ceyhun/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/FECFC682-A50B-4127-96BA-DA0FF75FCED4:327:337: script error: A property can’t go after this identifier. (-2740)

Link to post

Oops! sorry to hear that. Let's solve that. 

What version are you running? Also, which browser? 
v1.0.1 is the latest (as of now) -  https://github.com/vinaywadhwa/Go-Home-Alfred/releases/download/1.0.1/Go.Home.Alfred.-.v1.0.1.alfredworkflow
 

I noticed the Download link in the Github page was pointing to an older version, so it could be that you are running an older version (which had a similar bug)


 

Link to post
47 minutes ago, Vinay W said:

Oops! sorry to hear that. Let's solve that. 

What version are you running? Also, which browser? 
v1.0.1 is the latest (as of now) -  https://github.com/vinaywadhwa/Go-Home-Alfred/releases/download/1.0.1/Go.Home.Alfred.-.v1.0.1.alfredworkflow
 

I noticed the Download link in the Github page was pointing to an older version, so it could be that you are running an older version (which had a similar bug)


 

Thank you for your interest, I run v1.0.1 on safari, but after you reply I also tried it on chrome but still get the same debug output as before.

 

[20:06:04.890] Go Home, Alfred[Hotkey] Processing complete

[20:06:04.893] Go Home, Alfred[Hotkey] Passing output '' to Run Script

[20:06:05.130] ERROR: Go Home, Alfred[Run Script] /Users/Ceyhun/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/A4D09E7C-9C73-47EC-9D5B-3D7D2483C0C4:261:264: script error: Expected end of line but found property. (-2741)

[20:06:05.135] Go Home, Alfred[Run Script] Processing complete

[20:06:05.136] Go Home, Alfred[Run Script] Passing output '' to Run Script

[20:06:05.205] Go Home, Alfred[Run Script] Processing complete

[20:06:05.207] Go Home, Alfred[Run Script] Passing output 'https://

' to Run Script

[20:06:05.421] ERROR: Go Home, Alfred[Run Script] /Users/Ceyhun/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/723F3EB5-EB57-4EA7-94E3-082C5D140D8E:327:337: script error: A property can’t go after this identifier. (-2740)

 

Link to post

Sorry, I'm not sure what's wrong then. 

 

Here's a demo of me trying to do what you are (probably) doing - Download, install & run in all 3 browsers that the workflow supports - Safari, Google Chrome & Brave. See if you are doing the same thing?

(i'll leave here as a demo for future users)

 

Demo - https://imgur.com/oSbmaPK
 

If it still doesn't work, it probably has something to do with the browser versions we are using (I'm on Catalina 10.15.3, Safari 13.0.5, Chrome 81.0.4044.122, Brave 1.5.123)

Link to post
Posted (edited)

@JJJJ 

  • I re-wrote the whole thing in a way that works more reliably across different browsers (Technical details - using JXA instead of AppleScript now, as suggested here)
  • Should work for you now. If you are still interested, give the latest version a try (v1.0.2, as of now) and let me know if it works. 
  • Thanks for letting me know about this.
  • Also updated the original post

 

@deanishe 

  • i will post the code on github soon. 
  • Getting the hang of how i should structure my workflows. This discussion helps. Thanks!
Edited by Vinay W
Link to post
1 minute ago, Vinay W said:

@JJJJ 

  • I re-wrote the whole thing in a way that works more reliably across different browsers (Technical details - using JXA instead of AppleScript now, as suggested here)
  • Should work for you now. If you are still interested, give the latest version a try (v1.0.2, as of now) and let me know if it works. 
  • Thanks for letting me know about this.
  • Also updated the original post

 

@deanishe 

  • i will post the code on github soon. 
  • Getting the hang of how i should structure my workflows. This discussion helps. Thanks!

I was just replying to you that I do exactly the same thing as you do in the demo. But it still wasn't working.

 

However you just updated your workflow to v1.0.2 and it works with no issues now. 

 

Thank you again for your interest.

Link to post
45 minutes ago, Vinay W said:

Getting the hang of how i should structure my workflows.

 

Generally, it's a good idea to put your code in "External Scripts", rather than in the Script box. The Script box is a terrible editor, and source control works better when everything isn't contained in info.plist.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...