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

Is there a way to show where the click comes from in console? #80

Closed
tbrek opened this issue Oct 23, 2019 · 5 comments
Closed

Is there a way to show where the click comes from in console? #80

tbrek opened this issue Oct 23, 2019 · 5 comments

Comments

@tbrek
Copy link

tbrek commented Oct 23, 2019

I have the following setup in config:

{
      // Open any link clicked in those apps in Safari
      match: ({ sourceBundleIdentifier }) =>
      ["com.readdle.smartemail-Mac","com.meetfranz.franz","com.apple.iChat"].includes(sourceBundleIdentifier),
      browser: "Safari"
    }

However, while links from Messages and Spark are opening in Safari, those from Franz are not. The bundleID is correct. I wonder if Franz services have something to do with that.

@tbrek
Copy link
Author

tbrek commented Oct 23, 2019

I've added

{
    match: ({ sourceBundleIdentifier }) => {
      finicky.notify(sourceBundleIdentifier);
      finicky.log(sourceBundleIdentifier);
    },
    browser: "Google Chrome",
  }

to the config and the console shows bundleID as null

2019-10-23 09:55:34 - null

@johnste
Copy link
Owner

johnste commented Oct 23, 2019

I'm guessing Franz does something special when it opens urls which doesn't tell finicky the source bundle identifier.

@johnste
Copy link
Owner

johnste commented Oct 23, 2019

I can confirm and reproduce the issue by installing Franz and clicking the terms and conditions link in the account registration page.

@johnste
Copy link
Owner

johnste commented Oct 23, 2019

I spent some more time looking into this issue and it seems like the process that does the actual triggering (Franz Helper (Renderer)) doesn't have a bundle identifier, and thus cannot be targeted by checking it.

After considering the options, I decided to added sourceProcessPath to the options supplied to Finicky's handlers. With it you can use the path of the process to detect if a url is being opened by Franz. The full path to the process Franz uses I get is /Applications/Franz.app/Contents/Frameworks/Franz Helper (Renderer).app/Contents/MacOS/Franz Helper (Renderer). With that information, I created a simple example that should work:

{
  // Open links where the path contains "Franz.app" in Safari (Experimental!)
  match({ sourceProcessPath }) {
    return sourceProcessPath.includes("Franz.app");
  },
  browser: "Safari"
}

The new release is here: https://github.com/johnste/finicky/releases/tag/v2.2.2

@tbrek
Copy link
Author

tbrek commented Oct 24, 2019

@johnste thanks a lot. That fixes my issue.

@tbrek tbrek closed this as completed Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants