Jump to content

Customize URL / bookmark modifier actions


Recommended Posts

It would be great if we could customize what "option + enter" or "control + enter" (or any modifier for the matter) do on a bookmark. Or even press tab to open a context menu where we could have custom actions.

 

In my case, I wish I could send the URL to an AppleScript so that it opens in the current tab instead of on a new tab. I can see many other nice use cases for that.

Link to comment
Share on other sites

Thank you, the plugin looks good! However, I'm getting an a "Runtime error: index out of range" when trying to run most of the actions. Do you have any clue what can it be?

 

For Alfred, It would be cool if one could  apply scripts or customizations to any URL (not only bookmarks). For example, for ad hoc URLs that you type out ad in alfred's prompt.

Link to comment
Share on other sites

Thank you, the plugin looks good! However, I'm getting an a "Runtime error: index out of range" when trying to run most of the actions. Do you have any clue what can it be?

 

For Alfred, It would be cool if one could  apply scripts or customizations to any URL (not only bookmarks). For example, for ad hoc URLs that you type out ad in alfred's prompt.

Link to comment
Share on other sites

35 minutes ago, thiagoaraujos said:

However, I'm getting an a "Runtime error: index out of range" when trying to run most of the actions. Do you have any clue what can it be?

 

Need more information than that. What does Alfred's debugger say? Which versions of Safari and macOS are you using?

Link to comment
Share on other sites

Sure, macOS Sierra and Safari 11.0

 

Starting debug for 'Safari Assistant'
[2017-10-26 10:30:59][ERROR: input.scriptfilter] Code 1: ?
10:30:59 workflow.go:583: ------- Safari Assistant/0.2 (AwGo/0.10.1) -------
10:30:59 safari.go:293: Unknown top-Level folder: Books
10:30:59 workflow.go:592: ------------------ FATAL ERROR -------------------
10:30:59 workflow.go:593: runtime error: index out of range : goroutine 1 [running]:
runtime/debug.Stack(0xc42017b8e0, 0x1, 0x1)
    /usr/local/Cellar/go/1.9.1/libexec/src/runtime/debug/stack.go:24 +0xa7
github.com/deanishe/awgo.(*Workflow).Run.func1(0xc4200be6c0)
    /Users/daj/src/github.com/deanishe/awgo/workflow.go:593 +0x11f
panic(0x43b0140, 0x45a3230)
    /usr/local/Cellar/go/1.9.1/libexec/src/runtime/panic.go:491 +0x283
git.deanishe.net/deanishe/go-safari.(*Parser).parseRaw(0xc42010e000, 0xc4200e4770, 0x45cb9b8, 0x0, 0x0, 0x2, 0x0)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:325 +0x1517
git.deanishe.net/deanishe/go-safari.(*Parser).parseData(0xc42010e000, 0xc420110000, 0x14456, 0x14656, 0x14656, 0x0)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:244 +0x160
git.deanishe.net/deanishe/go-safari.(*Parser).Parse(0xc42010e000, 0x0, 0xc42010d2c0)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:230 +0x8a
git.deanishe.net/deanishe/go-safari.New(0x0, 0x0, 0x0, 0x1, 0x1, 0x43fe598)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:209 +0x1ce
git.deanishe.net/deanishe/go-safari.getParser(0x9)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:406 +0x5b
git.deanishe.net/deanishe/go-safari.FilterBookmarks(0x4410298, 0x3, 0x3, 0x4400177)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:424 +0x22
main.doFilterBookmarks(0x4400177, 0x9)
    /Users/daj/src/git.deanishe.net/deanishe/alfred-safari-assistant/bookmarks.go:70 +0x2d
main.run()
    /Users/daj/src/git.deanishe.net/deanishe/alfred-safari-assistant/alsf.go:370 +0x8c1
github.com/deanishe/awgo.(*Workflow).Run(0xc4200be6c0, 0x44102c0)
    /Users/daj/src/github.com/deanishe/awgo/workflow.go:605 +0x22c
main.main()
    /Users/daj/src/git.deanishe.net/deanishe/alfred-safari-assistant/alsf.go:430 +0x39
10:30:59 workflow.go:594: ---------------- END STACK TRACE -----------------
10:30:59 feedback.go:437: Sent 1 result(s) to Alfred
10:30:59 workflow.go:724: [ERROR] runtime error: index out of range
10:30:59 workflow.go:752: ---------------------- 11ms ----------------------
[2017-10-26 10:30:59][ERROR: input.scriptfilter] Code 1: ?
10:30:59 workflow.go:583: ------- Safari Assistant/0.2 (AwGo/0.10.1) -------
10:30:59 folders.go:23: query=
10:30:59 safari.go:293: Unknown top-Level folder: Books
10:30:59 workflow.go:592: ------------------ FATAL ERROR -------------------
10:30:59 workflow.go:593: runtime error: index out of range : goroutine 1 [running]:
runtime/debug.Stack(0xc42017b8a8, 0x1, 0x1)
    /usr/local/Cellar/go/1.9.1/libexec/src/runtime/debug/stack.go:24 +0xa7
github.com/deanishe/awgo.(*Workflow).Run.func1(0xc4200be6c0)
    /Users/daj/src/github.com/deanishe/awgo/workflow.go:593 +0x11f
panic(0x43b0140, 0x45a3230)
    /usr/local/Cellar/go/1.9.1/libexec/src/runtime/panic.go:491 +0x283
git.deanishe.net/deanishe/go-safari.(*Parser).parseRaw(0xc42010e000, 0xc4200e4770, 0x45cb9b8, 0x0, 0x0, 0x2, 0x0)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:325 +0x1517
git.deanishe.net/deanishe/go-safari.(*Parser).parseData(0xc42010e000, 0xc420110000, 0x14456, 0x14656, 0x14656, 0x0)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:244 +0x160
git.deanishe.net/deanishe/go-safari.(*Parser).Parse(0xc42010e000, 0x0, 0xc42010b2c0)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:230 +0x8a
git.deanishe.net/deanishe/go-safari.New(0x0, 0x0, 0x0, 0x2, 0xc420017cd8, 0x6)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:209 +0x1ce
git.deanishe.net/deanishe/go-safari.getParser(0x6)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:406 +0x5b
git.deanishe.net/deanishe/go-safari.Folders(0x43ffded, 0x8, 0xc420059d40)
    /Users/daj/src/git.deanishe.net/deanishe/go-safari/safari.go:441 +0x22
main.doFilterAllFolders(0x43ff993, 0x7)
    /Users/daj/src/git.deanishe.net/deanishe/alfred-safari-assistant/folders.go:25 +0xab
main.run()
    /Users/daj/src/git.deanishe.net/deanishe/alfred-safari-assistant/alsf.go:379 +0x80a
github.com/deanishe/awgo.(*Workflow).Run(0xc4200be6c0, 0x44102c0)
    /Users/daj/src/github.com/deanishe/awgo/workflow.go:605 +0x22c
main.main()
    /Users/daj/src/git.deanishe.net/deanishe/alfred-safari-assistant/alsf.go:430 +0x39
10:30:59 workflow.go:594: ---------------- END STACK TRACE -----------------
10:30:59 feedback.go:437: Sent 1 result(s) to Alfred
10:30:59 workflow.go:724: [ERROR] runtime error: index out of range
10:30:59 workflow.go:752: ---------------------- 4ms -----------------------
Link to comment
Share on other sites

Thanks. The error is caused by having top-level bookmarks. The parser expects all your bookmarks to be in either "Favorites" or "Bookmarks Menu". As you can see, it's also ignoring top-level folders:

10:30:59 safari.go:293: Unknown top-Level folder: Books

I'll look into it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...