johnste / finicky

A macOS app for customizing which browser to start
MIT License
3.67k stars 136 forks source link

Cancel request altogether #281

Closed pnewell closed 2 years ago

pnewell commented 2 years ago

Any ideas, suggestions or other feedback I am using finicky in a couple of unique ways and there are certain scenarios where links are automatically "opened" by the system, but they may not have sufficient information to be a fully valid link/url. I am able to detect that scenario with javascript, but so far I haven't scene any way to cancel a click altogether, if I return an empty string it reverts to the original opener.

Is there any way to just ask finicky to stop execution?

johnste commented 2 years ago

It's been a while but I think you can return null or possibly undefined and the request won't be fulfilled.

pnewell commented 2 years ago

Thanks, that worked!

In case anyone needs to do this in the future, you need to set the browser in one of the handlers to null:

  handlers: [
    {
      match: ["apple.com/*", "example.org/*"],
      browser: null
    }
  ]