Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support URL Scheme #86

Closed
urapico opened this issue Nov 14, 2019 · 5 comments
Closed

Support URL Scheme #86

urapico opened this issue Nov 14, 2019 · 5 comments

Comments

@urapico
Copy link

urapico commented Nov 14, 2019

I'd like to use URL Scheme to open with specific desktop app.

ex) Trello mac app / https://apps.apple.com/jp/app/trello/id1278508951?mt=12

Now I rewrote protocol but I got an error message on finicky.

    rewrite: [
        {
            match: finicky.matchHostnames(["trello.com"]),
            url: ({ url }) => ({
                ...url,
                protocol: "trello"
            })
        }
    ],

Error Message

 Configuration: Error: url: Value not one of string or {
  "protocol": "https, http or file",

I suggest that the validation will be removed.

@stevemoser
Copy link

I was actually thinking of something similar. I want to open bookmarklets and javascript: protocol isn't recognized by the system open.
Also I wonder if I can inject some AppleScript into this app to open a bookmarklet like so:

const bookmarklet_code="{query}" const frontmost_app_name = Application('System Events').applicationProcesses.where({ frontmost: true }).name()[0] const frontmost_app = Application(frontmost_app_name) frontmost_app.doJavaScript(bookmarklet_code, { in: frontmost_app.documents[0] })

@johnste
Copy link
Owner

johnste commented Nov 14, 2019

@urapico I can make this happen for sure. I hope to get some time this weekend to work on some open issues.

@stevemoser Not sure this can be done. I don't think javascript: is an actual valid url protocol? (I could be mistaken).

As for AppleScript the alpha build for #49 is using it to control Chrome. Also I've seen requests for running AppleScript scripts so that's something I'm considering.

Edit: @stevemoser Would you mind opening another issue for the AppleScript question?

@johnste
Copy link
Owner

johnste commented Nov 18, 2019

@urapico Published a new release that should fix this https://github.com/johnste/finicky/releases/tag/v2.2.3

@urapico
Copy link
Author

urapico commented Nov 20, 2019

It seems working fine.
Thank you very much. 👍

@johnste johnste closed this as completed Nov 21, 2019
@ralphjsmit
Copy link

ralphjsmit commented Aug 30, 2023

@urapico Sorry for tagging you, but I'm trying to figure out how to set up Finicky for Trello. This issue was the only reference to Trello + Finicky that I could find 😄 Does the way you set it up still work and if so, could you share how you set up your configuration file?

My configuration file:

module.exports = {
  defaultBrowser: "Safari",      
  rewrite: [
    {
      match: finicky.matchHostnames(["trello.com"]),
        url: ({ url }) => ({
          ...url,
          protocol: "trello"
        })
      }
  ],
  handlers: [
    {
      match: ["trello.com/*"],
      browser: "Trello"
    }
  ]
}

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants